RSI Value are not giving correct value when using universe C#

For example:


BMO on 15/2/18  -  RSI <25 


BMO on 15/2/18  -  RSI around 43


Not just BMO, lots of RSI value are not accurate.

I am using following code to find low RSI value equities.

But unfortunely many equites RSI value are much higher than 25.

I am not too sure that is RSI problem or Universe problem.

  AddUniverse(coarse =>
                return (from cf in coarse
                        where cf.Price < 150
                           where cf.DollarVolume > OneBillion

                        let avg = _averages.GetOrAdd(cf.Symbol, sym => new SelectionData())
                          where avg.Update(cf.EndTime, cf.Price)
                         where avg.rsi_1 <25
                        where cf.Price > avg.sma_80
                        where avg.sma_40 > avg.sma_60
                        where avg.sma_80 > avg.sma_100
                        where avg.sma_60 > avg.sma_100

                        orderby cf.DollarVolume descending 
                        select cf.Symbol);

Update Backtest

what i have seen it maybe take some time to lets say heat up the RSI indicator...

could you take maybe some measurments when the rsi indicator is gone through rsi period * 2 or period *3 values.

example:  rsi(9) daily  ... check values after 20 days

AND POST back when you find something

lets wait on an official answer from the staff but they did checks and backtests comparing with other sources and the indicator is used during online trading by many people .... also with backtests and all that stuff .......

but here are some RSI examples you could check printing the rsi values:


RSI using wilder

Thank you, Michael.

I have found the problem, 

I was using MovingAverageType.Simple in instead of MovingAverageType.Wilders.

rsi_1 = new RelativeStrengthIndex(12,MovingAverageType.Wilders );


The values are accurate now.

Thank you for your post.


Update Backtest


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.


This discussion is closed