Quote:
Originally Posted by Moxy
Hi Lux,
Thanks for the reply. I can workout out the individual iMA statements etc... the problem i have is how to reference the different time bars once a signal is triggered. For example... If I have a GET READY signal I need to look at the 2 bars before and 2 bars after (5 bars in total) for the other indicators to confirm I have a BUY SIGNAL on the open of the next bar. Not sure if I am making sense !!
I guess it is... how would i structure the necessary FOR loops etc.. when I need to reference bars both before and after the bar being processed.
Regards,
Moxy
|
You do this by using the shift variable in iMA(). You can also do this with Open, High, Low, Close values i.e. Close[3] which is 3 bars away from current bar.