sj1:
would like to do is: a) determine the # of bars on the chart b) determine the highest high and lowest low of those bars c) from MQL4, set the chart so that the visible range covers the area N ticks above and N ticks below the highest high and lowest low.
top = WindowPriceMax(), bottom = WindowPriceMin(), shiftChart =WindowFirstVisibleBar(); shiftChartEnd =shiftChart -WindowBarsPerChart(); if (shiftChartEnd<0) shiftChartEnd = 0; // Tester/shift
- sj1:Zoom in message? https://www.mql5.com/en/forum/124688
I'm interested in controlling the scaling of a chart from my MQL4 code, for the purpose of keeping certain markings I am creating always visible on the chart.
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
Hi.
I'm interested in controlling the scaling of a chart from my MQL4 code, for the purpose of keeping certain markings I am creating always visible on the chart.
For example, say I am creating a mark N ticks below the low of bar. If the market is in a downtrend, and the recent bars are near the lower right corner of the chart, my marking N ticks below will be off-the-chart and not visible.
What I would like to do is: a) determine the # of bars on the chart b) determine the highest high and lowest low of those bars c) from MQL4, set the chart so that the visible range covers the area N ticks above and N ticks below the highest high and lowest low.
Can this be done? If so which are the calls involved? (I have searched, but not found the answer.)
If this cannot be done as described, what are the next-best work-arounds?
Many thanks to those who can provide info on this!