Login Page - Create Account

Support Board


Date/Time: Thu, 30 Jan 2025 19:10:23 +0000



[Programming Help] - RSI DEMA

View Count: 1527

[2019-03-27 20:51:43]
REKT4K - Posts: 8
Good day.

I have a question on how to use/implement Double Exponential Moving Average with an RSI indicator.

I've looked at Sierra RSI source code from studies7.cpp, but this file does not contain the actual code of RSI calculation, so I just can't figure it out by myself, like I did on TradingView platform. Just as example, on TradingView the calculation looks like this:

src = close, len = input(14, minval=1, title="Length")
a1 = ema(max(change(src), 0), len)
b1 = ema(max(change(src), 0), len)
up = 2 * a1 - b1
c1 = ema(-min(change(src), 0), len)
d1 = ema(-min(change(src), 0), len)
down = 2 * c1 - d1
rsi = down == 0 ? 100 : up == 0 ? 0 : 100 - (100 / (1 + up / down))

But when I look at Sierra source code, I only see this in the calculation section:

sc.RSI(sc.BaseDataIn[InputData.GetInputDataIndex()], RSI, AvgType.GetMovAvgType(), RSILength.GetInt());

I may assume that calculation of "RSI", itself, is pre-defined server-side.

May I ask the developers to share the Sierra RSI calculation code used within the application? I will figure it out by myself on how to modify it to use the DEMA, it's just that I lack programming skills to write it from the scratch in a format that will be accepted by Sierra Chart.

Thx.
[2019-03-28 00:15:35]
Ackin - Posts: 1865
I have a question on how to use/implement Double Exponential Moving Average with an RSI indicator.
Try:
1) add RSI
2) add Moving Averages - Double Exponential
3) RSI study Settings:
Based On -> Double Exponential
Input Data -> DEMA

May I ask the developers to share the Sierra RSI calculation code used

scstudyfunctions.cpp

RSI_S

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

Login

Login Page - Create Account