SymbolSelect and SymbolInfoDouble taking too long to return value

 

The following code 

bool flagSelect = SymbolSelect(symb,true);
while (GetLastError() != 0) {
        Sleep(500);
        ResetLastError();
        flagSelect = SymbolSelect(symb,true);
        }
int count = 0;
double optionBid = 0;
do {
        optionBid = SymbolInfoDouble(symb,SYMBOL_BID);
        if (optionBid == 0) {
                Sleep(3000);
                count += 1;
        }
} while (optionBid == 0);
Print(count);

is taking more than 10 minutes to SYMBOL_BID > 0. Sometimes counter is greater than 100.

Depth of Market for symb has a valid bid price. Upon code start, symb isn't in MarketWatch.

Already used SymbolInfoTick as suggested here, but the same result.

Is it a server side problem? Does is depends on a new tick to show up? Any suggestion on how to handle it?

Thanks in advance.

SYMBOL_BID and SYMBOL_ASK always returning zero
SYMBOL_BID and SYMBOL_ASK always returning zero
  • 2017.08.24
  • www.mql5.com
The SYMBOL_BID and SYMBOL_ASK are always returning zero. Did I something wrong...