iXXXX methods, e.g. iClose() in indicators

 

Hi,

In an ea, since we are always at the 'last' bar, we can easily refer to iXXXX data from another timeframe.

An example is,

..current chart timeframe = M1

..refer to M15 iClose() of 5 bars back in M15 data iClose( NULL, 15, 5) where '5' is the shift

Are we able to do the same in indicators?

e.g. if we do "iClose( NULL, 15, 5) " on an indicator, on an M1 chart, are we referring to M15 bar 5 M1 bars back? or M15 bar 5 M15 bars back?

 
The latter. 5 M15 bars back.
 
circlesquares wrote >>
The latter. 5 M15 bars back.

so it is not possible to refer to another timeframe data in indicators?

note: i corrected my original post. it should be 'in an ea', not 'in an indicator'. sorry if it caused any confusion

back to the topic:

so it is not possible to refer to another timeframe data in indicators?

 

Yes, it is possible. Experiment with a test indicator.

Also search for indicators with the letters MTF in them, that means multi-time frame.

Those may usually do it in thier own way. Some use ArrayCopyRates to copy all of the other timeframe's data into an array.

You also can use the Time Series stuff like you mentioned iTime, iClose, etc.