Moving the attached indicators from one chart to another

 
Hi, I'm just asking in case there's something I wasn't aware of. If I want to move my current attached indicators from one chart to a different chart (on a different symbol) - how do I do it? Is the solution to save a template, and then load that template on the new chart?
 
Conor Mcnamara Is the solution to save a template, and then load that template on the new chart?

Why didn't you try it before bothering everyone else?

 
William Roeder #:

Why didn't you try it before bothering everyone else?

I'm sure you would have thought that I tried it already? because obviously I did... I'm asking if there is another trick.

 
Conor Mcnamara #:

I'm sure you would have thought that I tried it already? because obviously I did... I'm asking if there is another trick.

ChartIndicatorAdd() function if you prefer to use code
 
an EA multisymbol panel which switches between symbols and holds the same indicators on the chart is the best solution. case closed
 
Conor Mcnamara:
Hi, I'm just asking in case there's something I wasn't aware of. If I want to move my current attached indicators from one chart to a different chart (on a different symbol) - how do I do it? Is the solution to save a template, and then load that template on the new chart?

It's unclear what is your actual requirement, but probably you want just to change the symbol of the current chart by ChartSetSymbolPeriod?

Documentation on MQL5: Chart Operations / ChartSetSymbolPeriod
Documentation on MQL5: Chart Operations / ChartSetSymbolPeriod
  • www.mql5.com
Changes the symbol and period of the specified chart. The function is asynchronous, i.e. it sends the command and does not wait for its execution...
 
Stanislav Korotky #:

It's unclear what is your actual requirement, but probably you want just to change the symbol of the current chart by ChartSetSymbolPeriod?

I was wondering if there was any built in hot keys to move indicators, or if there is a "main chart" like on the mobile app or tradingview. But I think an EA panel with this API function is the best option for desktop MT5.
 
Conor Mcnamara #:
I was wondering if there was any built in hot keys to move indicators, or if there is a "main chart" like on the mobile app or tradingview. But I think an EA panel with this API function is the best option for desktop MT5.

There is another useful pair of functions: ChartSaveTemplate/ChartApplyTemplate.

Documentation on MQL5: Chart Operations / ChartApplyTemplate
Documentation on MQL5: Chart Operations / ChartApplyTemplate
  • www.mql5.com
Applies a specific template from a specified file to the chart. The command is added to chart messages queue and will be executed after processing...