MQL4 Add indicator to chart from EA - page 4

sara.sasha  
Alain Verleyen:

My friends, I want to place a command in the code below to add the "TDI" indicator on the chart when the click is done.
How to add the code to the following code?



//.......................................
   if (id == CHARTEVENT_OBJECT_CLICK) {
      string clickedChartObject = sparam;
      if (clickedChartObject == obj_name[4]) {
         string name = "name_" ;
     
      
  
 

 
 
       
      }
   }

Files:
rr.png  10 kb
AnkaSoftware  
For those still looking for a solution, ChartApplyTemplate offers a workaround, to load a indicator to a chart.
Marco vd Heijden  

Please show your code if you want help.

It takes the indicator handle to add the indicator to the chart.

Zixu Li  

Thanks @Georgiy Liashchenko it's working great! Is there a way to load the set file or the settings that I want?

14003435  
Zixu Li:

Thanks @Georgiy Liashchenko it's working great! Is there a way to load the set file or the settings that I want?

Please my EA is working but nothing is showing on my mt4.  Help me fix it please. 
Keith Watford  
14003435:
Please my EA is working but nothing is showing on my mt4.  Help me fix it please. 

Then how do you know that it is working?