Was confused by this example on Documentation - Research - Research on Indicators - QuantConnect.com
# Create a 14 period RSI indicator
rsi = RelativeStrengthIndex(14)
# Create a 30 period SMA indicator
sma = SimpleMovingAverage(30)
# Compose indicators
sma_of_rsi = IndicatorExtensions.Of(sma, rsi)
df_sma_of_rsi = qb.Indicator(rsiAverage, spy.Symbol, 360, Resolution.Daily)
Should rsiAverage in last line be sma_of_rsi, or sma_of_rsi in the previous line should be rsiAverage, or I missed something? Thanks
Varad Kabade
Hi Ruming Jiang,
rsiAverage in the last line should be sma_of_rsi.
Â
The above method takes the output of indicator2 to updated indicator1, thus creating a new indicator.
Best,
Varad Kabade
Ruming Jiang
Hi Varad, thanks for confirmation!
Ruming Jiang
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!