MqlTick with no ask nor bid values

 

I'm running a EA on WDO$D and when I try to get ask or bid values, to open position, both are zero!

The value variable is zero when I use SymbolInfoDouble and SymbolInfoTick.

   double BuyPrice(){
      double value = SymbolInfoDouble(symbol, SYMBOL_BID);
      if(value == 0){
         MqlTick tick;
         SymbolInfoTick(symbol,tick);
         value = tick.bid;
      }
      return value;
   }

On the code above, symbol = WDO$D and tick instance value is:

MqlTick{  time:D'2017.05.02 10:25:00' bid:0.0 ask:0.0 last:3205.5 volume:1 time_msc:1493720700000 flags:56 }


Why this is happening? I did something wrong?

 

Please, someone can help me to understand this?

Why this code works fine with EURUSD but not with WDO$D? There is some concept that I need to know or this is a code error?

 
I run the SAME CODE on WDO$D again today and the EA works fine now! The bid and ask values was filled.

I really don't know what was happened 2 days ago... It's very odd... :/ 
 
Rafael Caetano Pinto:
I run the SAME CODE on WDO$D again today and the EA works fine now! The bid and ask values was filled.

I really don't know what was happened 2 days ago... It's very odd... :/ 
SymbolInfoTick() is a function, which returns a value. Always check this value. Please read the documentation.
Reason: