Hello everyone this is my first post. I just want to know if I could get the index of volume bar in mlq4
I also want to know how to get the candlestick above this volume bar. How do I get that?
For example, let's say current volume bar would be index 0
Thank you
It's all in the documentation
https://docs.mql4.com/series
- docs.mql4.com
There is no such thing as a volume bar. Each candlestick has time, open, high, low, close, and (tick) volume.
let's suppose I am running a loop to see the tick value of volume for example
for (int i = 0; i<10; i++){ double x = Volume[i]; double y = Volume[i+1]; }
this would return the volume tick but I want to return the index of where it is so I can draw a line on candlestick associated with it. How would I do that?
I think you still don't get it... there is no Tick value of volume, there is only the number of ticks per candlestick, referred to as Tick Volume.
So it is a count of the number of prices (ticks) recieved during the bar, and nothing to do with the size of trades.
Right click a chart and enable Show Volumes, the Tick Volume per candlestick will then be shown at the bottom of the chart.
To access this information it is as per the documentation I pointed you to yesterday.
This bit of code will get and print the Tick Volume for the last ten candlesticks, starting with the latest (index 0)
Regards
https://docs.mql4.com/series/copytickvolume
#property strict void OnStart() { long TickVolume[10]; int Copied = CopyTickVolume(_Symbol,0,0,10,TickVolume); int Count; for(Count=0; Count<10; Count++) Print(Count + " - " + TickVolume[Count]); }
- docs.mql4.com
Do not double post!!
I have deleted your duplicate topic.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hello everyone this is my first post. I just want to know if I could get the index of volume bar in mlq4
I also want to know how to get the candlestick above this volume bar. How do I get that?
For example, let's say current volume bar would be index 0
Thank you