Get Real Volume of a Symbol

To add comments, please log in or register
lucas_heise
32
lucas_heise  

Hey, I've been searching for a long time how to get the current volume of a Symbol (not an order) and I just can't find anything that works.

For example, I want to get the real volume of this symbol below (real volume would be 2500). How can I get that on MQL5?

SymbolPriceVolume
PETR415.541000
PETR415.601500

Thanks
 

Alain Verleyen
36138
Alain Verleyen  

Is this what you want ?

lucas_heise
32
lucas_heise  
Alain Verleyen:

Is this what you want ?

I tried to use this but it didn't give me the right volume. In the example below, the volume should be: 46700 to sell and 38900 to buy (or 85600 in total), and as you can see, it says 28300...

 

 

PS* if there's a way to get only the buy volume and only the sell volume it would be even better, I tried SYMBOL_SESSION_BUY_ORDERS_VOLUME but it returns zero

Thanks 

Alain Verleyen
36138
Alain Verleyen  
lucas_heise:

I tried to use this but it didn't give me the right volume. In the example below, the volume should be: 46700 to sell and 38900 to buy (or 85600 in total), and as you can see, it says 28300...

 

 

PS* if there's a way to get only the buy volume and only the sell volume it would be even better, I tried SYMBOL_SESSION_BUY_ORDERS_VOLUME but it returns zero

Thanks 

Of course that's not the same.

To get the depth of market volume you need to use MarketBookGet() and make the addition yourself, I don't think there is a way to get it directly.

lucas_heise
32
lucas_heise  
Alain Verleyen:

Of course that's not the same.

To get the depth of market volume you need to use MarketBookGet() and make the addition yourself, I don't think there is a way to get it directly.

Thank you very much, I got it working
To add comments, please log in or register