Download MetaTrader 5

Using colors in Trend Indicators Class

To add comments, please log in or register

I have a simple question, but I cannot find a simple answer.  I am creating two moving averages in my code using the trend indicators class CiMA and putting them in my chart.  The question I have is how do I change the color of the moving average lines after they are placed in the chart.  Currently both the 8 and 21 MA's are red.


   CiMA                 cMA8;
   CiMA                 cMA21;

BOOL bResult; 

bResult = ChartIndicatorAdd(0, 0, cMA8.Handle());

bResult = ChartIndicatorAdd(0, 0, cMA21.Handle());

Documentation on MQL5: Chart Operations / ChartIndicatorAdd
Chart Operations / ChartIndicatorAdd - Documentation on MQL5
To add comments, please log in or register