Hi guys,
Trying to figure out and cant make it happened.
Need easier access to different timeframes on hotkeys. The only thing I am missing is when coming back from 1min TF it doesnt zooms in twice automatically, something overwrites that.
Ideal scenario is when moving to 1 - 1min TF it zooms out twice and moving to other hotkeys 2,3,4,5 it zooms in. Anyone has ideas ?
Thanks in advance
The issue is not MT5 but the zoom logic.
MT5 keeps the previous chart scale when switching timeframes unless you explicitly reset it.
In your code, zoom is only applied on M1, while other TFs use zoomTimes = 0, so the old scale is preserved.
Also, your ZoomIn() function actually zooms out (scale division), which makes the behavior confusing.
The fix is to:
- Separate real zoom-in and zoom-out functions
- Always apply zoom after ChartSetSymbolPeriod()
- Explicitly zoom out on M1 and zoom in on higher TFs
Once zoom is forced after every TF switch, the behavior becomes consistent.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi guys,
Trying to figure out and cant make it happened.
Need easier access to different timeframes on hotkeys. The only thing I am missing is when coming back from 1min TF it doesnt zooms in twice automatically, something overwrites that.
Ideal scenario is when moving to 1 - 1min TF it zooms out twice and moving to other hotkeys 2,3,4,5 it zooms in. Anyone has ideas ?
Thanks in advance