Attach Expert to Chart Command?

 
bool  ChartIndicatorAdd(
   long  chart_id,                 // chart ID
   int   sub_window                // number of the sub-window
   int   indicator_handle          // handle of the indicator
   );

Have we something like ChartIndicatorAdd But for Experts?

Maybe ChartExpertAdd ?

 
Boobwood:

Have we something like ChartIndicatorAdd But for Experts?

Maybe ChartExpertAdd ?

You can do it with  ChartApplyTemplate()

Creata a template with you expert and all other indicators you need and then apply the template to the chart.

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 of all previous commands. The Expert Advisor will be unloaded and will not be able to continue operating in case of successful loading of a new template to the chart it is attached to. If the...
 
Drazen Penic:

You can do it with  ChartApplyTemplate()

Creata a template with you expert and all other indicators you need and then apply the template to the chart.

thanks It is a Tricky Way

Thanks a Lot

Reason: