Accessing hitory data
I refer to history data on a pair that does not have a window open, the EA runs on another pair. Is the history data updated continouisly on that other pair or do I have to
have a window open on that other pair too?
OHLC price is only updated automatically on the symbols and time-frames in the current open profile.
When using values from other time-frames or symbols, you need to check that the history has been updated.
I refer to history data on a pair that does not have a window open, the EA runs on another pair. Is the history data updated continouisly on that other pair or do I have to
have a window open on that other pair too?
Interesting.
this is what I do:
--- snip ---
for(int i=0; i<220;i++)
{
Long_MA[i] = iMA(Pair,PERIOD_H1, period_long_new,0,MODE_MINE,PRICE_CLOSE,i);
Shrt_MA[i] = iMA(Pair,PERIOD_H1, period_shrt_new,0,MODE_MINE,PRICE_CLOSE,i);
Diff_MA[i] = Shrt_MA[i] - Long_MA[i];
}
--- snip ---
Should I try the following in a loop?
work = iMA(Pair,PERIOD_H11,period_long_new,0,MODE_MINE,PRICE_Close,219)
and test for lastError until it is ok and then do the real loop to fill my array
Interesting.
this is what I do:

- Free trading apps
- Free Forex VPS for 24 hours
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
I refer to history data on a pair that does not have a window open, the EA runs on another pair. Is the history data updated continouisly on that other pair or do I have to
have a window open on that other pair too?