- Save the scale. OnTick look for a change. OnTimer look for a change.
- I don't know if scale change triggers an OnChartEvent() try to look for:
Types of Chart Events - Chart Constants - Standard Constants, Enumerations and Structures - MQL4 ReferenceCHARTEVENT_CHART_CHANGE
Change of the chart size or modification of chart properties through the Properties dialog
- What are you doing that is sensitive to scale?
Thank you very much for the help!
I will try to solve this with the advice you've given.
Re 3.: I want to have certain labels (sticking to price on the y scale) have fixed positions on the x axis.
When I zoom, these labels should be displayed at their new positions immediately, without waiting for a new tick.
The labels actually are of type CChartObjectText, so OBJPROP_XDISTANCE is not available.
whroeder1:
- Save the scale. OnTick look for a change. OnTimer look for a change.
- I don't know if scale change triggers an OnChartEvent() try to look for:
- What are you doing that is sensitive to scale?
CHARTEVENT_CHART_CHANGE works nicely, thank you!
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
Is there any way to perform actions on the change of the chart window's zoom factor?
I can get the current chart scale and repaint the indicator/EA but it will only do that on the next tick after changing the chart scale.
I guess my method would be called something like onChartScaleChange() (which obviously, doesn't exist).
Is there any way to do this? Thanks a lot.