Login Page - Create Account

Support Board


Date/Time: Sun, 28 Apr 2024 05:53:52 +0000



RSI different from others

View Count: 1390

[2016-11-15 19:18:03]
Mike_S - Posts: 42
Why is Sierra charts RSI (using sma) different from other RSI's?
For example, lets compare Barcharts RSI to that of Sierra Chart.
I've done everything I can to get Sierras RSI to match that of other platforms but cannot figure out what is wrong.
Sierra Charts RSI give many false divergence signals as many times as price is coming down (Closes/Last used is settings and charting) RSI is still heading up. 14 day setting shown of close/last price.
This is something I absolutely need to figure out as is is an important part of a strategy and I don't want to switch platforms If I don't have to.
Added some vertical lines on the chart as points of reference, not pointing anything anything specific out.

Is there something different in your coding in which maybe I can have an RSI coded up that will match?

Any help is greatly appreciated.
Mike
Date Time Of Last Edit: 2016-11-15 19:19:49
imageRSI Compare.png / V - Attached On 2016-11-15 19:12:52 UTC - Size: 120.18 KB - 324 views
[2016-11-16 03:25:46]
Sierra Chart Engineering - Posts: 104368
The Sierra Chart RSI is properly calculated. That you can trust. However, it supports various moving average calculations. For the Average Type study Input, go through each of the available averages to see which one matches.

Also you may want to look at the RSI average rather than the raw RSI. Not really sure.

You can look at the calculation of it. Here it is:
SCFloatArrayRef RSI_S(SCFloatArrayRef In,
                SCFloatArrayRef RSIOut,
                SCFloatArrayRef UpSumsTemp,
                SCFloatArrayRef DownSumsTemp,
                SCFloatArrayRef SmoothedUpSumsTemp,
                SCFloatArrayRef SmoothedDownSumsTemp,
                int Index, unsigned int AveragingType, int Length)
{
  if (Length < 1 || Index < 1)
    return RSIOut;

  // calculate Up/Down sums
  float PreviousValue = In[Index - 1];
  float CurrentValue = In[Index];

  if (CurrentValue>PreviousValue)
  {
    // upward change
    UpSumsTemp[Index] = CurrentValue - PreviousValue;
    DownSumsTemp[Index] = 0;
  }
  else
  {
    UpSumsTemp[Index] = 0;
    DownSumsTemp[Index] = PreviousValue - CurrentValue;
  }

  // smooth the up/down sums
  MovingAverage_S(UpSumsTemp, SmoothedUpSumsTemp, AveragingType, Index, Length);
  MovingAverage_S(DownSumsTemp, SmoothedDownSumsTemp, AveragingType, Index, Length);

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

  return RSIOut;
}

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

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

Login

Login Page - Create Account