Hi,

 I'm trying to build two indicators which calculate the 30 period MA 
of the (1)ATR of the first 2 hours of the trading day and the (2)ATR 
of the rest of the day.

I would like to have a 30 period moving average of the atr od the 
first two hours of the trading day, and then a 30 period moving 
average of the rest of the day.

Can I do this without loops?

I was thinking in using something like :

Firsttwo=IIF(hour()<10, atr(1),null);
Restofday=IIF(hour()>=10,atr(1),null);
atrmovaverageF=ma(firsttwoh,30);
atrmovaveragerR=ma(restofday,30);

But I assume the null values will influence the MA calculation.. so 
I won't have the correct moiving average.

Any help on how I can get the correct figures?

thanks.
                        

Reply via email to