Conor Mcnamara: Are these volume fields on the struct for stocks only or something?
Correct. Only exchange based symbols, like stocks and futures have real volume. Non centralised symbols like Forex, CFDs, Crypto, etc. do not have real volume.
Thanks for clarifying. So I guess volume in MqlTick refers to real volume which is tracked and it's not tick volume in forex, so for tick volume on forex options would be iTickVolume, iVolume, and tick_volume in the OnCalculate function signature.
Conor Mcnamara #: Thanks for clarifying. So I guess volume in MqlTick refers to real volume which is tracked and it's not tick volume in forex, so for tick volume on forex options would be iTickVolume, iVolume, and tick_volume in the OnCalculate function signature.
MqlTick is simply a tick. Therefore it's tick volume is simply 1. One tick! So simple is not? 😅
Fernando Carreiro #:
MqlTick is simply a tick. Therefore it's tick volume is simply 1. One tick! So simple is not? 😅
Yes, I was trying to make a tick version of an indicator, and I was shifting older tick data back inside a loop, the bid price would shift fine, but the indicator also used volume, and unfortunately I wasted a lot of time assuming it was tick volume (which I needed). It wasn't until I was debugging all the parts when I found out too late that it wasn't giving me tick volume. Now using the tick_volume buffer and all is fine.
MqlTick is simply a tick. Therefore it's tick volume is simply 1. One tick! So simple is not? 😅

You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I want to know why the volume fields of the mqltick struct are always giving 0.0, both "volume_real" and "volume" are not giving any data. The "tick_volumes" buffer is plotting fine in this small example I made, but not volume from Mqltick struct.
Are these volume fields on the struct for stocks only or something?
Any time that I try to use the search bar for documentation, not working, even the codebase search does not work for me.
From the mql5 reference, it's not explained much.