I have the following code that when loading on historical data the BarColorSeries works perfectly however in real time it seems to keep coloring bars where the condition is not true any reason as to why this may be happening?
if(Highs[1][0] < CurrentDayOHL(BarsArray[1]).CurrentHigh[0] && Lows[1][0] > CurrentDayOHL(BarsArray[1]).CurrentLow[0] && Lows[2][0] == CurrentDayOHL(BarsArray[2]).CurrentLow[0]) { BarColorSeries[0] = Color.Cyan; } if(Highs[1][0] < CurrentDayOHL(BarsArray[1]).CurrentHigh[0] && Lows[1][0] > CurrentDayOHL(BarsArray[1]).CurrentLow[0] && Highs[2][0] == CurrentDayOHL(BarsArray[2]).CurrentHigh[0]) { BarColorSeries[0] = Color.HotPink; }
suprsnipes
Comment