Login Page - Create Account

Support Board


Date/Time: Sat, 18 Jan 2025 07:44:19 +0000



RSI Problem?

View Count: 2869

[2013-05-21 02:28:42]
vegasfoster - Posts: 444
I was plotting the RSI after reading this RSI-2 thing and it appears to me to have a decided down bias. I never really used the RSI before so I could be totally wrong or maybe that's what it's supposed to do.
imageRSI.png / V - Attached On 2013-05-21 02:25:46 UTC - Size: 39.87 KB - 526 views
[2013-05-21 04:18:09]
M5amhan - Posts: 468
Welles Wilder created the RSI, and it was later revised. now there are two versions of the RSI. one is just called RSI and the other is RSI-W which stands for wilder. I personally use the RSI-W

you can learn about it here just click on Relative Strength Index, i left it on this page in case you want to learn the basics of any other well known indicator
http://stockcharts.com/school/doku.php?id=chart_school:technical_indicators
[2013-05-21 16:24:51]
vegasfoster - Posts: 444
Maybe this shows it better. If plotted on a 4 renko bar on CL, it is oscillating between 0 and approximately 66 for a RSI(2) and 0 and approximately 83 for a RSI(5). It occasionally spikes over, but shouldn't it consistently be oscillating between 0 and 100 with a 50 centerline? Otherwise 30 and 70 or whatever are meaningless, you would have to sit there and approximate the range on every chart or in every formula for an automated entry.
imageRSI.png / V - Attached On 2013-05-21 16:24:02 UTC - Size: 59.6 KB - 572 views
[2013-05-21 16:31:46]
M5amhan - Posts: 468
i dont know why it does that.. i changed my RSI-W to a 2 period with 4 renko and it works as its supposed to, try using the RSI-W otherwise that is what the RSI is reading
[2013-05-22 15:45:55]
vegasfoster - Posts: 444
I looked at it some more and it only occurs when using the simple moving average and weighted moving average. The other moving averages appear to calculate correctly. Also, the longer the period, the less noticeable the effect. Both are probably reasons why it was never noticed prior to being subjected to the scrutiny of my obviously preternatural analytical skills. So...in the end I was right, and isn't that what really matters? Let's move on. :)
Date Time Of Last Edit: 2013-05-22 16:01:55
[2018-01-27 18:01:15]
Usermb - Posts: 126
I know this is a very old topic, but the problem lies in the decission to actually never allow 100, see below.
@SierraSupport: naive question, but why is 0 a valid value (when 0 == SmoothedUpSumsTemp[Index]) but 100 not?
IMHO this is not correct and leads to a bias.


  // compute RSI
  if (SmoothedDownSumsTemp[Index] != 0.0f)
  {
...
  }
  else
  {
    RSIOut[Index] = RSIOut[Index - 1];
  }

Date Time Of Last Edit: 2018-01-27 21:40:31
[2018-01-27 22:08:25]
Sierra Chart Engineering - Posts: 104368
That code is to avoid a division by zero error.

Is this how you want it?:
// compute RSI

if (SmoothedDownSumsTemp[Index] != 0.0f)
{
...
}
else
{
RSIOut[Index] = 100;
}


We can make this change.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
Date Time Of Last Edit: 2018-01-27 22:09:01
[2018-01-27 22:36:16]
Usermb - Posts: 126
Yes, those lovely devision by zero.

According to https://en.wikipedia.org/wiki/Relative_strength_index

If the average of D values is zero, then according to the equation, the RS value will approach infinity, so that the resulting RSI, as computed below, will approach 100.

For all practical reasons this "approach 100" should be represented by a value of 100 instead of taking the prior value. 99.99999 could do it as well for all I care ;-)

Just to give you a bit of background why I think it's wrong as it is right now: I have had a missed signal in Sierra that my backtesting platform triggered post factum. The culprint was a condition of RSI > 90 in the alert, that Sierra did not reach because the pesky prior value used with a zero SmoothedDownSumsTemp was 88.7
[2018-01-27 22:57:23]
Sierra Chart Engineering - Posts: 104368
OK understood. Change made.
Sierra Chart Support - Engineering Level

Your definitive source for support. Other responses are from users. Try to keep your questions brief and to the point. Be aware of support policy:
https://www.sierrachart.com/index.php?l=PostingInformation.php#GeneralInformation

For the most reliable, advanced, and zero cost futures order routing, *change* to the Teton service:
Sierra Chart Teton Futures Order Routing
[2018-02-02 16:53:33]
Usermb - Posts: 126
OK understood. Change made.
Problem seems indeed to have been fixed, thank you very much.

To post a message in this thread, you need to log in with your Sierra Chart account:

Login

Login Page - Create Account