Expected Behavior
WarmUpPeriod is the number of data points an indicator needs before IsReady turns true.
WarmUpIndicator feeds exactly that many and hands back a ready indicator.
Actual Behavior
AbandonedBaby, MatHold and RiseFallThreeMethods each turn ready one bar later than they
report.
AbandonedBaby WarmUpPeriod 12, ready at sample 13
MatHold WarmUpPeriod 15, ready at sample 16
RiseFallThreeMethods WarmUpPeriod 15, ready at sample 16
WindowIndicator.WarmUpPeriod => Period holds while IsReady is the window's own. These three
override IsReady to Samples > Period and leave WarmUpPeriod alone. The other 58 candlestick
patterns use Samples >= Period.
Reproducing the Problem
var pattern = new AbandonedBaby();
for (var i = 0; i < pattern.WarmUpPeriod; i++)
{
pattern.Update(new TradeBar(new DateTime(2019, 1, 1).AddDays(i), Symbols.SPY,
100m + i, 105m + i, 95m + i, 100m + i, 100m, Time.OneDay));
}
Console.WriteLine(pattern.IsReady); // False
CommonIndicatorTests.WarmsUpProperly asserts exactly this, and CandlestickPatternTests does not
derive from CommonIndicatorTests, so it has never run for any pattern.
Same surface as #8629, different cause: there WarmUpPeriod is absent, here it is present and one
short.
System Information
master at d865a40.
Checklist
Expected Behavior
WarmUpPeriodis the number of data points an indicator needs beforeIsReadyturns true.WarmUpIndicatorfeeds exactly that many and hands back a ready indicator.Actual Behavior
AbandonedBaby,MatHoldandRiseFallThreeMethodseach turn ready one bar later than theyreport.
WindowIndicator.WarmUpPeriod => Periodholds whileIsReadyis the window's own. These threeoverride
IsReadytoSamples > Periodand leaveWarmUpPeriodalone. The other 58 candlestickpatterns use
Samples >= Period.Reproducing the Problem
CommonIndicatorTests.WarmsUpProperlyasserts exactly this, andCandlestickPatternTestsdoes notderive from
CommonIndicatorTests, so it has never run for any pattern.Same surface as #8629, different cause: there
WarmUpPeriodis absent, here it is present and oneshort.
System Information
master at d865a40.
Checklist
masterbranch