Hi
I am not sure why my indicator is not changing color. please help thx.
I am not sure why my indicator is not changing color. please help thx.
MQL5:
double iBuf[]; double iBuf_colour[]; int OnInit() { SetIndexBuffer(0,iBuf,INDICATOR_DATA); SetIndexBuffer(1, iBuf_colour,INDICATOR_COLOR_INDEX); PlotIndexSetInteger(0,PLOT_COLOR_INDEXES,2); PlotIndexSetInteger(0,PLOT_LINE_COLOR,0,Red); PlotIndexSetInteger(0,PLOT_LINE_COLOR,1,Blue); } int OnCalculate(...) { for(int x = 0; x < ArraySize(itemp); x++) { iBuf[x] = itemp[x]; if(x>6) iBuf_colour[x]=0; else iBuf_colour[x]=1; } }
Last edited by a moderator: