We are updating RSI indicator using historical dataset. In some scenarios, RSI is 0.0.
SetStartDate(2019, 06, 15);
SetEndDate(2019, 06, 29);
var currentRSI = new RelativeStrengthIndex(14, MovingAverageType.Simple);
foreach (TradeBar tradeBar in tradeBarHistory)
{
currentRSI.Update(tradeBar.EndTime, tradeBar.Close);
}
--Log Output--
2019-06-19 09:32:00 currentRSI: 0.0 (AMD)
2019-06-19 09:33:00 currentRSI: 0.0 (FXI)
Could it be data issue or am I doing something wrong in the code?
Michael Manus
without a small example there is nothing to do....
maybe you reset it somewhere or something like that in one small code line. this should work
i would search for a rsi example in the tutorials or samples on github and copy/paste that and use it....
also i would check what history returns it looks like for each runs 0 times
maybe history is your problem.... print everything with Log()
Link Liang
Hi Saurabh,
Would you share a complete algorithm which reproduces this issue, so that we can address it in detail? Thanks for your support!
Saurabh Maheshwari
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!