Back

Difference in RSI

Hi.

I'm new to this community - but it looks very promising.

I'm doing some backtests against Forex, in this case NZDCHF (Daily). But when comparing the result for RSI from in this case Tradingview (uses FXCM as feed) i get different results when calculating RSI.

For example when running RSI(13) with AddSecurity("NZDCHF", symbol, Resolution.Daily); I get RSI of 77.3 on the 5th of February 2016. But in TradingView i have RSI(13, Close) of 46 for the same currency pair at that date.

What am i missing here? 

Best regards 

Rickard

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.



Hi Rickard,

Since you didn't post your algorithm, I wrote a simple one that calculates RSI for NZDCHF. Here are the results:

01/16 -> NZDCHF RSI: 20.57152 Price: .647585
01/18 -> NZDCHF RSI: 23.64659 Price: .649995
01/19 -> NZDCHF RSI: 26.61363 Price: .648425
01/20 -> NZDCHF RSI: 21.47386 Price: .638240
01/21 -> NZDCHF RSI: 32.16748 Price: .646750
01/22 -> NZDCHF RSI: 45.67456 Price: .659175
01/23 -> NZDCHF RSI: 47.19756 Price: .659085
01/25 -> NZDCHF RSI: 58.34438 Price: .661690
01/26 -> NZDCHF RSI: 52.98365 Price: .653775
01/27 -> NZDCHF RSI: 53.01358 Price: .659485
01/28 -> NZDCHF RSI: 46.87006 Price: .655690
01/29 -> NZDCHF RSI: 55.81628 Price: .659320
01/30 -> NZDCHF RSI: 63.05678 Price: .663250
02/01 -> NZDCHF RSI: 61.41560 Price: .662165
02/02 -> NZDCHF RSI: 61.26091 Price: .664320
02/03 -> NZDCHF RSI: 63.97564 Price: .666325
02/04 -> NZDCHF RSI: 77.32512 Price: .669295
02/05 -> NZDCHF RSI: 68.02995 Price: .665530
02/06 -> NZDCHF RSI: 47.41832 Price: .656670

For 5th of February 2016, RSI(13) for NZDCHF is 68.02995 if you use a Simple Moving Average (default) and 58.32333 if you use an Exponential MA. What MA does TradingView use?
You could also check the closing prices to see if there are differences.

0

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.


Hi Alexandre, i see that you have a RSI and price for the 6th of February. That is a Saturday - market should be closed? When looking closer - all saturdays are included.

Also the RSI for the 6th of february seems to match the one i have for the 5th of february. Can it be a issue with time coversion of different time zones or something?

0

Hi, Rickard,

I should have printed out the trade bar time (opening time) instead of algorithm time that refers to the moment after the bar was closed. So when it prints out February 6th, the values belongs to the 5th. Sorry about the confusion.

Reviewing the results, we can conclude that QuantConnect RSI (47.41832) and TradingView one (46) are pretty close!   

 

0

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.


Update Backtest





0

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.


Loading...

This discussion is closed