diff --git a/indicators/LinearRegression.cs b/indicators/LinearRegression.cs index febb24b..0aaedd1 100644 --- a/indicators/LinearRegression.cs +++ b/indicators/LinearRegression.cs @@ -66,6 +66,12 @@ namespace NinjaTrader.NinjaScript.Indicators BarBrushes[0] = BelowThresholdColor; CandleOutlineBrushes[0] = BelowThresholdColor; } + else + { + // Handle the rare occasion where the close is equivalent to the linear regression at this bar. + BarBrushes[0] = BarBrushes[1]; + CandleOutlineBrushes[0] = CandleOutlineBrushes[1]; + } } }