changing properties of standard indicators using the function "ChartIndicatorAdd"

To add comments, please log in or register
Daniel Weckhuyzen
272
Daniel Weckhuyzen  

Hi, 


I can't find in the "help" of MT5 how I can change some properties of an added indicator using the "ChartIndicatorAdd" function.

For instance: I've added a standard exponential moving average using the code:

indicator_handle = iMA(Symbol(),Period(), 20, 0, MODE_EMA, PRICE_CLOSE);

 window=0;

 if (ChartIndicatorAdd(0,window,indicator_handle))

 {

 Print (__FUNCTION__, " Adding EMA's succesfull");

 }   

Now I would like to change the color of the EMA-curve and the thinkness of the line.

Is there a way to do this ?


thx for your help !!

Danny




William Roeder
19857
William Roeder  
When you post code please use the CODE button (Alt-S)! (For large amounts of code, attach it.) Please edit your (original) post.
          General rules and best pratices of the Forum. - General - MQL5 programming forum
          Messages Editor
Anthony Garot
3630
Anthony Garot  
change some properties of an added indicator using the "ChartIndicatorAdd" function.

https://www.mql5.com/en/forum/38961

Set Indicator Line Color Through EA
Set Indicator Line Color Through EA
  • 2015.01.07
  • www.mql5.com
Hi guys, How to change an indicator line color after add it to the chart by an expert advisor...
fxsaber
14667
fxsaber  
With the help of ChartSaveTemplate/ChartApplyTemplate it is possible to do this. The example for understanding.
Daniel Weckhuyzen
272
Daniel Weckhuyzen  

Thx for your help everybody !!

Until now, I think the only way out is creating the indicator myself with adding extra parameters for the colors, type and thickness.


Keep on posting !


Thx

To add comments, please log in or register