why not has volume in MqlTick data

 

hi , l have a problem ,l wish get tick volume and lused the code such as :

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());
//---
  }

 

 but the result of debug is volume =0 ,i  have a guess , the volume of tick is not  sent to termnial,

if  someone  can give me a answer , thank you  very much !

Documentation on MQL5: Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants
  • www.mql5.com
Standard Constants, Enumerations and Structures / Indicator Constants / Price Constants - Documentation on MQL5
 
Please, properly insert code.
 
MQL5.community - User Memo
  • 2010.02.25
  • MetaQuotes Software Corp.
  • www.mql5.com
You have just registered and most likely you have questions such as, "How do I insert a picture to my a message?" "How do I format my MQL5 source code?" "Where are my personal messages kept?" You may have many other questions. In this article, we have prepared some hands-on tips that will help you get accustomed in MQL5.community and take full advantage of its available features.
 
stangstang:

hi , l have a problem ,l wish get tick volume and lused the code such as :

but the result of debug is volume =0 ,i  have a guess , the volume of tick is not  sent to termnial,

if  someone  can give me a answer , thank you  very much !

It depends on Symbol which you are getting tick information.