Hi,
put this at the end of your code
// ****************** ONLY ONE TRADE EVERY DIRECTION *******************
L_trade = 0;
firstBarOfTheDay = DateNum()!=Ref(DateNum(),-1);
for (i=0;i<BarCount;i++)
{
if (firstBarOfTheDay[ i ] ) L_trade = 0;
if(L_trade==1 AND Buy[ i ] )
{
Buy[ i ] = 0;
}
if(L_trade==0 AND Buy[ i ]) L_trade = 1;
}
S_trade = 0;
firstBarOfTheDay = DateNum()!=Ref(DateNum(),-1);
for (i=0;i<BarCount;i++)
{
if (firstBarOfTheDay[ i ] ) S_trade = 0;
if(S_trade==1 AND Short[ i ] )
{
Short[ i ] = 0;
}
if(S_trade==0 AND Short[ i ] ) S_trade = 1;
--- In [email protected], "Dorothy" <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> Can anyone help me?
>
> 1. Is it possible to code a intra day trading system that takes a
> trade only ONCE per day? If this trade is over (stopped out, profit
> target reached etc), the system will not take any signal for that day.
>
> 2. Is it possible to get the high and low based on time, that is high
> and low between 10:15 am to 12:15 pm?
>
> Thank you,
> Dor
>