Download MetaTrader 5

why not has volume in MqlTick data

To add comments, please log in or register
Do you need private account monitoring? The Signals will provide you one!
stangstang
113
stangstang 2010.09.27 20:29 

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
Rashid Umarov
Admin
11815
Rashid Umarov 2010.09.27 22:32  
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.
Alexey Da
Moderator
6604
Alexey Da 2010.09.28 09:52  
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.



To add comments, please log in or register