Handle cases where the current bar's close is exactly equal to the linear regression
This commit is contained in:
parent
27a94141a2
commit
ca7f284332
@ -66,6 +66,12 @@ namespace NinjaTrader.NinjaScript.Indicators
|
|||||||
BarBrushes[0] = BelowThresholdColor;
|
BarBrushes[0] = BelowThresholdColor;
|
||||||
CandleOutlineBrushes[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];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user