If I create an EA* and use SymbolIsSynchronized() on EURUSD for example:
The terminal prints the following:
No matter what I do (change timeframes, re-attach the EA to EURUSD), it always displays 0 (false); does this function work for anyone else?
* I'm using an MT4 terminal, but the same happens using MT5.
Thanks in advance for any help.
This function is not documented for mql4, it's not working and return error 4014.
4014 |
ERR_UNKNOWN_COMMAND |
Unknown command |
On mql5, there is no problem for me.
2016.03.29 21:36:25.988 __TEST__ (EURUSD,M1) EURUSD synchro =1
This function is not documented for mql4, it's not working and return error 4014.
4014 |
ERR_UNKNOWN_COMMAND |
Unknown command |
On mql5, there is no problem for me.
2016.03.29 21:36:25.988 __TEST__ (EURUSD,M1) EURUSD synchro =1
Thanks for your prompt reply, much appreciated.
I was using an old demo account in MT5 and when I created a new one, the terminal updated and it now works.
For reference, you can't use MarketWatch window symbols, instead you have to physically open the chart for the function to check synchronisation, which I presume forces the 1minute candle data download so the terminal can create the hcc history file(s) for all other timeframes.
Thanks again for your help.
For reference, you can't use MarketWatch window symbols, instead you have to physically open the chart for the function to check synchronisation, which I presume forces the 1minute candle data download so the terminal can create the hcc history file(s) for all other timeframes.
From the experience with my own custom indicators, market watch symbols can be synchronized without an open chart.
If SymbolIsSynchronized returns false, the symbol will be immediately synced on the next incoming tick.
Maybe you want to checkout the Refresh command from the standard library.
https://www.mql5.com/en/docs/standardlibrary/expertclasses/expertbaseclasses/cexpert/cexpertrefresh
- www.mql5.com
From the experience with my own custom indicators, market watch symbols can be synchronized without an open chart.
If SymbolIsSynchronized returns false, the symbol will be immediately synced on the next incoming tick.
Maybe you want to checkout the Refresh command from the standard library.
https://www.mql5.com/en/docs/standardlibrary/expertclasses/expertbaseclasses/cexpert/cexpertrefresh
Why are you thinking the Refresh() command is related to this topic ?
"Refresh
Updates all data."
Seems not to be totally unrelated, but it was only a guess, anyway.
If it's not relevant, I would be pleased to receive your explanation why so.
"Refresh
Updates all data."
Seems not to be totally unrelated, but it was only a guess, anyway.
If it's not relevant, I would be pleased to receive your explanation why so.
Refresh() command is to update your EA data from Terminal data.
SymbolIsSynchronize() is about Server data versus Terminal data.
Refresh() command is to update your EA data from Terminal data.
SymbolIsSynchronize() is about Server data versus Terminal data.
I admit, not fully understanding the difference between Terminal and Server data.
Is it like local (stored on my computer) vs. external (brokers server) data?
I admit, not fully understanding the difference between Terminal and Server data.
Is it like local (stored on my computer) vs. external (brokers server) data?
Refresh() command is to update your EA data from Terminal data.
SymbolIsSynchronize() is about Server data versus Terminal data.
Hi Alain, for you the use of isSynchronized is only useful once in OnInit (to know if the symbol is connected to the server) instead Refresh when we want to be sure we have the latest data update? However, it is still possible that the symbol goes out of synchronisation...
hanks in advance!
- Terminal starts.
- Indicators/EAs are loaded. Static and globally declared variables are initialized. (Do not depend on a specific order.)
- OnInit is called.
- For indicators OnCalculate is called with any existing history.
- Human may have to enter password, connection to server begins.
- New history is received, OnCalculate called again.
- A new tick is received, OnCalculate/OnTick is called. Now TickValue, TimeCurrent, account information and prices are valid.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
If I create an EA* and use SymbolIsSynchronized() on EURUSD for example:
The terminal prints the following:
EURUSD,H1: sync status: 0
No matter what I do (change timeframes, re-attach the EA to EURUSD), it always displays 0 (false); does this function work for anyone else?
* I'm using an MT4 terminal, but the same happens using MT5.
Thanks in advance for any help.