Your code looks okay and it appears to be:
- retrieving ticks for the past n candles using the CopyTicksRange function, and
- writing the tick data (including time, bid, ask, and volume_real) to external CSV file.
NOTE: if your broker is not providing accurate volume data, the volume_real value may not be reliable.

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
Hello! I would like to retrieve all ticks for the past n candles. In MqlTick structure, what is tick[i].volum and tick[i].volum_real ?
I am geting zero for both of them unless I connect to a broker wich is giving real volume.
Can I retrieve tick_volume at every tick for forex market using MqlTick structure?
Thanks!
this is what I use :