MQL4 Add indicator to chart from EA - page 4

 
iCustom();
 
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
 
For those still looking for a solution, ChartApplyTemplate offers a workaround, to load a indicator to a chart.
 

thankz at all the  new  verson  with my metatrader 1170  not  work return me error

2019.01.09 21:50:48.961    cannot open file 'C:\Users\pc\AppData\Roaming\MetaQuotes\Terminal\B6FECCFE53E01D2BAC26AAD9B14029A8\MQL4\indicators\.ex4' [123]

give me thesame error with Gregory code and  Kray  some suggestions ?

 

Use MT5 and

ChartIndicatorAdd();
 

i follow  your suggest Marco , but  now  i have  another  problem  ,  where is all indicator? o_O  i try to look in  folder  indicator  but  exist only example folder and  when i try to put them  some indicator  in the navigator  (also after restart ) not visualize nothing  o_O  whats  wrong ?

thankz again

 

Please show your code if you want help.

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

 

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

 
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. 
 
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?

Reason: