How to change the color of an indicator in EA?

 

How can I change the color of an indicator that appears on the chart, thru an EA.

For example:

mediumEma = iMA(NULL,0,21,0,MODE_SMA,PRICE_CLOSE,1);
longEma = iMA(NULL,0,55,0,MODE_EMA,PRICE_CLOSE,1);

both appear in red color.

Regards

Andreas

 
You need to use CI to do this, can't use the ordinary indicators. The rule in CI is : one line one color, so if you need 2 color you need 2 line, to show one color you must EMPTY_VALUE the other line. If you need to change it through an EA, you need GLOBAL VARIABLE on both the EA and CI so they both can communicate/ exchange data.
 
onewithzachy wrote >>
You need to use CI to do this, can't use the ordinary indicators. The rule in CI is : one line one color, so if you need 2 color you need 2 line, to show one color you must EMPTY_VALUE the other line. If you need to change it through an EA, you need GLOBAL VARIABLE on both the EA and CI so they both can communicate/ exchange data.

onewithzachy,

Thank you for your answer.

Andreas

Reason: