Download MetaTrader 5
To add comments, please log in or register
Do you need a programmer? Make an order to let the developer find you!
obay 2015.09.10 19:06 


while trying to implement a Multi-Currency EA I stumbled upon this:

When looping over all symbols and just printing out their Names and Paths, some Symbols create errors that crash the EA. This only happens in tester, not on Demo-Account.

Here is a code-snippet:

   for(int i=0;i<SymbolsTotal(false);i++)


      string thisSymbolName=SymbolName(i,false);

      string thisSymbolPath=SymbolInfoString(thisSymbolName,SYMBOL_PATH);

      Print("Symbol ",i," Name=",thisSymbolName," Path=",thisSymbolPath);


The crucial output lines are of the type:

GH 3 18:56:52.472 History no data synchronized, 37 bytes read

NQ 2 18:56:52.472 Symbols symbol GerTecDec15 history synchronization error


GetLastError() returns 4301 , that is ERR_MARKET_UNKNOWN_SYMBOL. 

For your convenience I attached an example-EA and a log of it's execution. 

Does anyone have any ideas how this can be circumvented? Is there any way to download only specific history data?

20150910.log 106 kb
To add comments, please log in or register