Login Page - Create Account

Support Board


Date/Time: Mon, 20 Jan 2025 19:02:46 +0000



Post From: Reverse Engineering RSI

[2018-06-29 16:00:50]
User80860 - Posts: 5
Is there anyone still reading this forum? I hope so.

I would also like to have the Reverse Engineering RSI ported to Sierra Chart, if possible. I find it more valuable than all other Moving Averages I know.

It shouldn't take more than 5 minutes to someone who knows what they're doing.



Here's the code from Thinkscript:

input length = 50;
input price = close;
input rsiValue = 50.0;
input smoothingType = {default Wilders, EMA};

def coeff = rsiValue / (100 - rsiValue);
def chg = price - price[1];
def diff;
switch (smoothingType) {
case Wilders:
diff = (length - 1) * (WildersAverage(Max(-chg, 0), length) * coeff - WildersAverage(Max(chg, 0), length));
case EMA:
diff = (length - 1) * (ExpAverage(Max(-chg, 0), length) * coeff - ExpAverage(Max(chg, 0), length)) / 2;
}

def value = price + if diff >= 0 then diff else diff / coeff;
plot RevEngRSI = CompoundValue(1, value[1], Double.NaN);
RevEngRSI.SetDefaultColor(GetColor(8));



Thanks!
Date Time Of Last Edit: 2018-06-29 16:01:48