if(Wechsel==true) { ColorBuffer[0]=0; Wechsel=false; } else { ColorBuffer[0]=1; Wechsel=true; }
It still doesn't work.
int OnCalculate(const int rates_total, const int prev_calculated, const datetime &time[], const double &open[], const double &high[], const double &low[], const double &close[], const long &tick_volume[], const long &volume[], const int &spread[]) { ArraySetAsSeries(open,true); ArraySetAsSeries(high,true); ArraySetAsSeries(low,true); ArraySetAsSeries(close,true); ArraySetAsSeries(time,true); ArraySetAsSeries(OpenBuffer,true); ArraySetAsSeries(HighBuffer,true); ArraySetAsSeries(LowBuffer,true); ArraySetAsSeries(CloseBuffer,true); ArraySetAsSeries(ColorBuffer,true); OpenBuffer[0]=open[0]; HighBuffer[0]=high[0]; LowBuffer[0]=low[0]; CloseBuffer[0]=close[0]; static datetime last_time=-1; if(last_time!=time[0]) { last_time = time[0]; if(Wechsel==true) { ColorBuffer[0]=0; Wechsel=false; } else { ColorBuffer[0]=1; Wechsel=true; } } return(rates_total); }
Thank you so much!!!
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hello, I have developed an indicator that should change the color alternately with every candlestick, but the color remains the same all the time. I would be very grateful for any help.