MqlTick volume is always zero

 

Hi

I use example from MQL4 help file in my code (the same as https://www.mql5.com/en/docs/constants/structures/mqltick). It prints correct time, correct bid, correct ask, but volume is always zero. I even tried to insert 10 sec delay so that there were several price changes between calling SymbolInfoTick, but still the same: volume=0. EURUSD, M1. Please help!!!

void OnTick()
  {
   MqlTick last_tick;
//---
   if(SymbolInfoTick(Symbol(),last_tick))
     {
      Print(last_tick.time,": Bid = ",last_tick.bid,
            " Ask = ",last_tick.ask,"  Volume = ",last_tick.volume);
     }
   else Print("SymbolInfoTick() failed, error = ",GetLastError());
//---
  }
 
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Structure for Current Prices
Documentation on MQL5: Standard Constants, Enumerations and Structures / Data Structures / Structure for Current Prices
  • www.mql5.com
Standard Constants, Enumerations and Structures / Data Structures / Structure for Current Prices - Reference on algorithmic/automated trading language for MetaTrader 5
 
vopot:

Hi

I use example from MQL4 help file in my code (the same as https://www.mql5.com/en/docs/constants/structures/mqltick). It prints correct time, correct bid, correct ask, but volume is always zero. I even tried to insert 10 sec delay so that there were several price changes between calling SymbolInfoTick, but still the same: volume=0. EURUSD, M1. Please help!!!

This is information is only available if the broker provide it, and afaik not available with MT4.
 
which broker offer the full data ,please ?
 
Alain Verleyen:
This is information is only available if the broker provide it, and afaik not available with MT4.

Why tick volume not avalible in MT4?

Why broker volumes not avalible in mt4? 

 
does the terminal i download from MQL5.com offer all the data ,and are the data the same with other brokers ?
 
Yes, but the Volume indicator gets Tick Volume from somewhere. Why does CopyTicks can't get it from same source?
 
kurbads:
Yes, but the Volume indicator gets Tick Volume from somewhere. Why does CopyTicks can't get it from same source?

Who said that ? There is no such problem.

The topic was about real traded volume, not tick volume.

 

Same issue here on MT4. When SymbolInfoTick is called, the tick is loaded successfully within OnTick - but returned tick's volume is always zero - no matter what the target symbol is (I've tried indexes and currency pairs - the volume indicator has value).


@AlainVerleyen - your over confidence in denying the issue is not helpful. Just my two cents. (:

Reason: