Quick question regarding history data required for this code:

[Deleted]  

Hello

Basically I have this code:

 

iOpen(Symbol(),PERIOD_MN1,1);

Which is used in my EA running on a 5 minute chart.

Will I need approx 2 months worth of bars present on the 5 Minute chart, or just approx 2 months worth of bars on the Monthly chart for the code to return the correct figure?

Kind regards

 

Antony 

[Deleted]  

Also does the EA read from the open chart or the history files when calling for a Period() different from the current chart ie, Called PERIOD_MN1 from a 5 min chart

 

Thanks

 

Antony 

 
tonyjms2005:

Also does the EA read from the open chart or the history files when calling for a Period() different from the current chart ie, Called PERIOD_MN1 from a 5 min chart

 

Thanks

 

Antony 

From history files, you don't need an open chart. For your iOpen() you need the data of the last month on MN1 timeframe.