- The symbol you passed is not in the Market Watch.
- You would know that if you had checked the error code.
- The symbol you passed is not in the Market Watch.
- You would know that if you had checked the error code.
Really appreciate the advise. Yeah, i did the error check and it showed 4106. However the pair still appears in the marketwatch.
Really appreciate the advise. Yeah, i did the error check and it showed 4106. However the pair still appears in the marketwatch.
Where does symbol comes from?
Where does symbol comes from?
Not sure, if i understood the question correctly. When i test the EURUSD pair, i try to get the number of digits of the GBPUSD pair (because i use it's data from csv files), which is showed in the warketwatch window. It doesn't have any suffixes or prefixes, it just is "GBPUSD". In terms of the name of the pair, everything is correct.
Not sure, if i understood the question correctly. When i test the EURUSD pair, i try to get the number of digits of the GBPUSD pair (because i use it's data from csv files), which is showed in the warketwatch window. It doesn't have any suffixes or prefixes, it just is "GBPUSD". In terms of the name of the pair, everything is correct.
SymbolInfoInteger(symbol,SYMBOL_DIGITS)
That i mean, where comes symbol from?
I checked the other 'SymbolInfo' functions, it's the same issue. Prior to calling the function, i try select a symbol in the marketwatch, but receive 'false'. In the real mode everything works correctly. In the tester, I cannot get information of any pair, except for the one I am testing.
The code is very simple:
input string Pair = "GBPUSD";
//+------------------------------------------------------------------+
//| Expert initialization function |
//+------------------------------------------------------------------+
int OnInit()
{
//--
ResetLastError();
long digits = SymbolInfoInteger(Pair,SYMBOL_DIGITS);
if(digits <= 0) Print("ERROR! ",__FUNCTION__,": Issue with getting the number of digits of the symbol "+Pair+". The error code: "+(string)GetLastError());
//---
return(INIT_SUCCEEDED);
}

- www.mql5.com
Not sure about it but I think MT4 doesn't support multi-symbol tests. MT5 does, though.
Probably it's the answer to the issue.

- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Greetings everyone,
I try to get a specific symbol information (in my case it's GBPUSD) in a tester while testing another pair (EURUSD). When i try to get the information about how many symbol digits the GBPUSD pair has, i get '0'.
The used code:
SymbolInfoInteger(symbol,SYMBOL_DIGITS)