I setup a manual RSI indicator with 1-day consolidator to cross-reference with the automatic daily-RSI. In theory they should always match.
- for the manual 1-day RSI, I used following the official doc(Iterate through the historical data and call consolidator.update)
- for the automatic RSI, I use warm_up_indicator helper method
You can notice in the log that, the RSI value for the first day/the last warmup value before the first day doesn't match. For all following days they do match.

Hang Gong
I also adjust the indicator's built in window size and try to see if historical values matches after warmup. It turns out that for the entire rolling window, all warm-up values dont match.
Mia Alissi
Here’s what’s wrong in your code, and why you see the initial mismatch between your manual and automatic RSI:
Bugs and Logic Issue
self.warm_up_indicator(self.spy, self.rsi_auto_warmup, self.resolution)
for the automatic RSI. But this warms up the auto RSI after history has already been pushed through the consolidator, meaning it’s essentially been warmed twice (once in setup, then again with warm_up_indicator).How to Fix
self.warm_up_indicator()
entirely, and just prime both RSI indicators by updating only through the consolidator loop over history. Like this, both construct their internal buffer from the identical sequence and count of bars, so their state will always match.Here is the revised workflow:
Summary:
warm_up_indicator
for the same automatic indicator.Let me know if you want the version that instead uses only
warm_up_indicator
for both, or if you want to see added logs/checks for indicator readiness!Sources: Automatic Indicators - QuantConnect.com, Stochastic Indicator Warms Up Properly Regression Algorithm, Indicator Warmup Algorithm, Manual Indicators - QuantConnect.com, Consolidate Hour Bars Into Daily Bars Regression Algorithm
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Mia Alissi
When you use a custom window size (e.g.,
indicator.window = 5
) on an indicator like RSI, it's critical that both your manual and automatic RSI indicators are "warmed up" with exactly the same sequence and number of bars. If you warm them up differently—such as usingwarm_up_indicator
for the automatic RSI and manual history+consolidator updates for the manual RSI—they will usually NOT match within the contents of their internal rolling window, even after warmup.Why this mismatch happens:
warm_up_indicator
) might feed a different set of data or use a different sequence of historical data bars. Sometimes, the amount of data or the order in which it's fed creates an offset or misalignment between the two RollingWindows.window
values. If the priming process is not absolutely identical (in terms of both data bars and update sequence), the windows will naturally diverge. That means the values for all indices ([0], [1], ..., [window-1]) will show a mismatch after warmup (until enough new live bars have arrived to "flush out" the window with new matching data).How to guarantee matching RollingWindows after warmup:
warm_up_indicator
and a manual history update at the same time.window=5
, request at least 14+5+some buffer bars).Corrected Example: Here’s how you can precisely synchronize the rolling window for both manual and "automatic" RSI by manually updating both from the same history:
Key points:
warm_up_indicator
orset_warmup()
when manually priming in this fashion.Let me know if you want further illustration or a logging/debugging helper for this!
Sources: Automatic Indicators - QuantConnect.com, Manual Indicators - QuantConnect.com, Warm Up Periods - QuantConnect.com, Indicator Warmup Algorithm, Stochastic Indicator Warms Up Properly Regression Algorithm
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
Hang Gong
But in my code warm_up_indicator warms up my auto-RSI, and consolidator warms up my manual RSI. so each indicator is only warmed up once.
Hang Gong
The material on this website is provided for informational purposes only and does not constitute an offer to sell, a solicitation to buy, or a recommendation or endorsement for any security or strategy, nor does it constitute an offer to provide investment advisory services by QuantConnect. In addition, the material offers no opinion with respect to the suitability of any security or specific investment. QuantConnect makes no guarantees as to the accuracy or completeness of the views expressed in the website. The views are subject to change, and may have become unreliable for various reasons, including changes in market conditions or economic circumstances. All investments involve risk, including loss of principal. You should consult with an investment professional before making any investment decisions.
To unlock posting to the community forums please complete at least 30% of Boot Camp.
You can continue your Boot Camp training progress from the terminal. We hope to see you in the community soon!