Thread: How to code?
View Single Post
  #1531 (permalink)  
Old 01-13-2009, 08:34 AM
InTrance InTrance is offline
Senior Member
 
Join Date: Apr 2006
Posts: 158
InTrance is on a distinguished road
Quote:
Originally Posted by Moxy View Post
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.
__________________
Need a Professional Programmer? PM me
Reply With Quote