Custom indicator colour change

 

Hello everyone,

I have created a customer indicator but for some reason when i go to the properties tab in the settings panel I can't change the colours of the lines, I can only change the with and style of the lines. Below is a snipping of my code. Have I done something wrong?


#property indicator_separate_window

#property indicator_buffers 6
#property indicator_plots   4

#property indicator_type1   DRAW_FILLING
#property indicator_label1  "channel1;Channel2"
#property indicator_color1  clrAqua,clrCrimson

//--- plot Signal
#property indicator_label2  "Signal"
#property indicator_type2   DRAW_LINE
#property indicator_color2  clrRed
#property indicator_style2  STYLE_SOLID
#property indicator_width2  1
//--- plot Macd
#property indicator_label3  "line3"
#property indicator_type3   DRAW_LINE
#property indicator_color3  clrBlue
#property indicator_style3  STYLE_SOLID
#property indicator_width3  1

//--- plot Histogram
#property indicator_label4  "Histogram"
#property indicator_type4   DRAW_COLOR_HISTOGRAM
#property indicator_color4  clrRed,clrDeepSkyBlue
#property indicator_style4  STYLE_SOLID
#property indicator_width4  2

int OnInit()
  {
//--- indicator buffers mapping

   if(filling)
     {
      SetIndexBuffer(0,SellBuffer,INDICATOR_DATA);
      SetIndexBuffer(1,BuyBuffer,INDICATOR_DATA);
     }
   SetIndexBuffer(2,SignalBuffer,INDICATOR_DATA);
   SetIndexBuffer(3,MacdBuffer,INDICATOR_DATA);
   SetIndexBuffer(4,HistogramBuffer,INDICATOR_DATA);
   SetIndexBuffer(5,HistogramColors,INDICATOR_COLOR_INDEX);

//ArraySetAsSeries(MacdBuffer, true);
//ArraySetAsSeries(HistogramColors, true);

   MacdHandle = iMACD(Symbol(), Period(), Fast_EMA, Slow_EMA, Signal,PRICE_CLOSE);
   OSMAHandle = iOsMA(Symbol(), Period(), Fast_EMA, Slow_EMA, Signal,PRICE_CLOSE);

   MaxPeriod = (int)MathMax(MathMax(Signal,Slow_EMA), Fast_EMA);

   PlotIndexSetInteger(0, PLOT_DRAW_BEGIN, MaxPeriod);
   PlotIndexSetInteger(1, PLOT_DRAW_BEGIN, MaxPeriod);
   PlotIndexSetInteger(2, PLOT_DRAW_BEGIN, MaxPeriod);
   PlotIndexSetInteger(3, PLOT_DRAW_BEGIN, MaxPeriod);
   PlotIndexSetInteger(4, PLOT_DRAW_BEGIN, MaxPeriod);
//---
   return(INIT_SUCCEEDED);
  }
 
You haven't created any input parameters (' input ' variables) - that's why you don't see properties.
 
Vladimir Karputov:
You haven't created any input parameters (' input ' variables) - that's why you don't see properties.

Hello Vladimir, I have some inputs but are unrelated to the issue. The issue is with the change of the properties. As you can see from the screenshot below I can freely change the width and style of the lines. I can't do the same of the color though.

properties

 
clean up the order with the number of indicator buffers and the number of plots.  throw out unnecessary and unnecessary from oninit.  always create a stub using the mql wizard.
Reason: