This indicator will synchronise timeframes, zoom (scale), type (mode) and auto-scroll of the charts it's on. If you change the timeframe, zoom, type or autoscroll on one chart, it will automatically match those on other charts with this indicator.
Version 2.0 will synchronise other charts only if the chart you changed the timeframe on also has this indicator.
Versions before 2.0 work in a totally different way, are slower and may freeze MT4 for a few seconds until all charts update, depending on how many charts and other indicators you have. All information below is based on 2.0.
Example setup:
I have 6 charts opened. Charts #1, #2, #3 and #4 have this indicator on them, charts #5 and #6 do not have this indicator.
If I change the timeframe, zoom, type or auto-scroll on chart #1, #2, #3 or #4; charts #1, #2, #3 and #4 will also change to match the chart with the focus. Charts #5 and #6 will not change.
If I set auto-scroll to false and move chart #1, #2, #3 or #4; charts #1, #2, #3 and #4 will also move.
Options:
SyncChartZoom
If set to 'true', if you zoom in/out on the focused chart, other charts with this indicator will zoom in/out as well.
SyncChartType
If set to 'true', chart type ("bar", "candle" or "line") on all charts with this indicator will change depending on the type of the focused chart.
SyncChartMove
If set to 'true', "AutoScroll" option will be synced and other charts with this indicator will move (left/right) when you move the chart with focus.
NOTE: This may not work very well when charts are in different timeframes - right now it works off of candle number relative to chart window. It's on my TODO list to make it scroll to match time of the candle instead of just candle number.
UpdateOnlyOnTick
If set to 'false', indicator checks for changes in timeframes on a timer - by default 250ms, 50ms when AutoScroll is disabled (and chart may be moved left/right).
If set to 'true', indicator checks for changes only on new ticks.
This option is for debugging mainly, if set to 'true' timeframe sync can take a long time, depending how often an instrument ticks (e.g. out of market hours when there a very few or even no ticks).
GlobalVariablePrefix
This is the prefix for global variables used for sync. Mostly debugging/feature.
You can set it different on different charts to sync certain charts together instead of all of them (e.g. charts #1, #2 and #3 on one variable, charts #3 and #4 on another, etc.). If you have a few pairs of charts, e.g. one short-term and one long-term of the same instrument - you can set it to, e.g. "chartSync_short" on all short-term charts and "chartSync_long" on all long-term charts, etc.
TimerMsNotMoving
When UpdateOnlyOnTick is false, this is the delay (in milliseconds) between checks for chart changes.
TimerMsMoving
When UpdateOnlyOnTick is false and SyncChartMove is true, this is the delay (in milliseconds) between checks for chart changes when auto-scroll is disabled and charts are moved together.
Hope it's useful. Feedback/suggestions welcomed.
This is the name of the global variable used to sync Period.
When UpdateOnlyOnTick is false, this is the delay (in milliseconds) between checks for chart changes when auto-scroll is enabled.