Correct way of calling indictor on different timeframe?

Back to topics list To post a new topic, please log in or register
avatar
179
gangsta1 2015.01.05 18:55
 
    if (iCCI(NULL, PERIOD_D1,14,PRICE_OPEN,1) > 100)
Does this look correct? I have a feeling that the 100 will be referenced from the timeframe the EA is running on rather than d1?
avatar
735
honest_knave 2015.01.05 19:05 #
 

Take a look at iBarShift()

The code you have posted will retrieve the value of iCCI from the previous D1 bar. Not the previous bar of the chart timeframe (unless that also happens to be on D1).

100 is 100, regardless of what timeframe. 

Back to topics list  

To add comments, please log in or register