How can I use iBands function on previous data in MQL5

 

Hello dear friends,

In MQL5, How can I use functions iBands, iStochastic, iRSI and so on, on previous data (like 1 year ago)?

I need price archive with some indicator values on it, How can I rich this data set?

thanks in advance for your help.

 
Alireza Saebi: I need price archive

The chart is your “archive”. Just read the values you want.

 

You can obtain the data from the chart directly. First just find the indexes for bars which are covering the data from last year.  And use those indicators functions and set buffers with proper shift parameter (in range of last year data). Also you can get OHLC prices the same way – just use proper shift for CopyHigh/Low/Open/Close buffers.