How to make EMA colored by default for an EA?

 

May I ask how to change color of EMA in MQL5? I have two EMA in an EA and both of them by default has a same color (red), and I want to display them in different colors by default.

struct EMA_STRUCT
  {
   double            ema[];
   int               handle;

  };

input int ema1_period= 10; //EMA1 period(lowest)
input int ema2_period= 25; //EMA2 period

int OnInit()
  {
   if(ema1_period !=0)
     {
      ArrayResize(ema_struct,ArraySize(ema_struct)+1);
      ema_struct[ArraySize(ema_struct)-1].handle= iMA(_Symbol,PERIOD_CURRENT,ema1_period,0,MODE_EMA,PRICE_CLOSE);
      ChartIndicatorAdd(0,0,ema_struct[ArraySize(ema_struct)-1].handle);
      ArraySetAsSeries(ema_struct[ArraySize(ema_struct)-1].ema,true);
     }
   if(ema2_period !=0)
     {
      ArrayResize(ema_struct,ArraySize(ema_struct)+1);
      ema_struct[ArraySize(ema_struct)-1].handle= iMA(_Symbol,PERIOD_CURRENT,ema2_period,0,MODE_EMA,PRICE_CLOSE);
      ChartIndicatorAdd(0,0,ema_struct[ArraySize(ema_struct)-1].handle);
      ArraySetAsSeries(ema_struct[ArraySize(ema_struct)-1].ema,true);
     }
   panel_creator();
   panel_updater();
//---
   return(INIT_SUCCEEDED);
  }

Would highly appreciate any suggestion, to make this ema into colored lines by default. Thanks, look forward to the suggestions.

Regards.

 
saad2siraj: How to make EMA colored by default for an EA?

Code has no eyes; they don't need to see the indicator on the chart, just the values. If you want to see it, you add it to the appropriate chart.

There is no (and will not ever be) ChartIndicatorAdd in MT4.
          MQL4 Add indicator to chart from EA - MQL4 programming forum #18 (2016)

use ChartApplyTemplate() or go down the rabbit hole.
          MQL4 Add indicator to chart from EA - MQL4 programming forum #1 (2016) and #27 (2018) #55 (2022), and Issues with PostMessageW in MQL4 | Forex Factory #27 (2020)

Reason: