Tick volume data

 

Hi,

I wanted to make an EA that compares the volume of the current tick to the volume of the last tick but I was not able to. When I do Print(Volume[0]) I get 1, and Print(Volume[1]) returns the same value multiple times (like 4,4,4,4,2,2,2,2,6,6,6,7,7,6,etc). How can I get the volume of the latest tick?..

 

mfurlend:

How can I get the volume of the latest tick?..

Volume in MT4 has a different definition than in other platforms.... See here -> https://www.mql5.com/en/forum/126023. So your question makes no sense - Volume[i] gives the volume (number of ticks) in bar i...
 
Print(Volume[0]) I get 1, and Print(Volume[1]) returns the same value multiple times

Volume[1] is the number of ticks of bar one. It won't change until the current bar closes and then becomes Volume[2].

Volume[0] is a increasing number (not necessary starting at one and not necessary linear, it can skip values)