get tick volume using metatrader5 python module

 

Hi

i am developing a backtester in python so i have tried to use the official python example https://www.mql5.com/en/docs/python_metatrader5/mt5copyticksrange_py to copy ticks but the volume seems to be always 0. is there any way i can get the volume information as well.

Thanks in advance

Documentation on MQL5: Python Integration / copy_ticks_range
Documentation on MQL5: Python Integration / copy_ticks_range
  • www.mql5.com
copy_ticks_range - Python Integration - MQL5 Reference - Reference on algorithmic/automated trading language for MetaTrader 5
 
swadeeep: i am developing a backtester in python so i have tried to use the official python example https://www.mql5.com/en/docs/python_metatrader5/mt5copyticksrange_py to copy ticks but the volume seems to be always 0. is there any way i can get the volume information as well. Thanks in advance

For non centralised exchanges, like Forex, CFDs, etc. there is usually never any real volume (always zero).

Only symbols for centralised exchanges, like Futures and Stocks, have real volume in the tick data.

Please be aware of the difference between real volume and tick volume (which is simply a count of ticks).

 

hey  Fernando Carreiro

thanks for taking time to reply my query. 

some functions like copy_rates_from_pos is returning tick_volume.  and there is also a mql function CopyTickVolume(). so i though it might be possible from python. 

so is tick volume same as number of ticks? 

Fernando Carreiro
Fernando Carreiro
  • 2023.04.19
  • www.mql5.com
Trader's profile
 
swadeeep #: so is tick volume same as number of ticks? 

Yes, [tick volume] = [tick count].

swadeeep #: so i though it might be possible from python

Yes, it is possible to get both [tick volume] and [real volume] from rates data, in Python.

Tick volume is always available while real volume is only available when the underlying symbol and market supports it.

Reason: