It seems having this type of error it's always possible, and i have to try to get it another time on the next tick ...
Download history in MQL4 EA - Forex Calendar - MQL4 programming forum - Page 3 #26 № 4
The function linked to, opens a hidden chart for the symbol/TF in question (if not already open,) thus updating history, and temporarily placing the symbol on Market Watch (if not already there,) so SymbolInfoDouble(symbol, SYMBOL_BID) or MarketInfo(symbol, MODE_BID) don't also return zero on the first call.
On MT5: Unless the chart is that specific
pair/TF,
you must Synchronize the terminal Data from the Server.
Is
it mystical?! It is! - Withdraw - Technical Indicators - MQL5 programming forum
Timeseries
and Indicators Access / Data Access - Reference on algorithmic/automated trading language for MetaTrader 5
Synchronize
Server Data with Terminal Data - Symbols - General - MQL5 programming forum
SymbolInfoInteger
doesn't work - Symbols - General - MQL5 programming forum 2019.09.03

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello,
Sometimes i have a bug using functions iHigh, iLow, iClose on the current chart, and current Symbol. I use it like that (in an indicator):
double HWeek = iHigh(Symbol(),PERIOD_W1,0);
double LPWeek = iLow(Symbol(),PERIOD_W1,1);
double LWeek = iLow(Symbol(),PERIOD_W1,0);
Sometimes when i change symbol on mt5, it returns 0... i have to change ut one time or two times to get the correct values.
The last error returns ERR_HISTORY_NOT_FOUND - 4401
i don't understand why it works, and sometimes not.
Someone can help me?
I am running on mt5 5.00 build 2085
Thank you!!