Displaying Volume on Chart window
You are right, it's because the values are drawn relative to the price. You have to use https://docs.mql4.com/windows/WindowPriceMin and introduce some scaling variable. It should work basically.
But there are a few downsides.
- if the range of the visual chart changes you have to redraw all the values
- it will not realy work for visual backtests since you cannot calculate easily the WindowPriceMin for past bars..
Oh thanks for the quick response! I was unfamiliar with WindowPriceMin. I'll incorporate WindowPriceMin, or just simply use Ctrl-L.
Thanks again!
i though you may want use some custom volume indicator...
Oh yes that is my intent. But was just going to use Ctrl-L if all else failed as I wanted to make modifications to the standard Volume indicator.
Hi,
Would anyone know how to display volume in the chart window?
It is easy enough displaying it in a separate window, but I am having problems placing it in the chart window itself (at the bottom border). My code is listed below. If I use #property indicator_separate_window, it shows in a separate window. If I use #property indicator_chart_window, it doesn't show at all. I guess this is because the indicator values are displayed relative to price itself, which might be an issue.
Any help most appreciated.
Cheers, mag1kus