Louis Winthorp III

RSI Reverse Engineering indicator

Category: Indicators By: Louis Winthorp III Created: September 14, 2018, 4:50 PM
September 14, 2018, 4:50 PM
Indicators
7 Comments
RSI Reverse Engineering indicator

With the RSI Reverse Engineering indicator, you are able to calculate the price of the next candle on a certain value of the RSI. E.g. what price is needed for the RSI to be at 70 on the next candle.

REM Reverse Engineering RSI, original by Giorgos Siligardos
REM Build for ProRealTime, used RSI with WilderAverage

REM Parameters
RSIRevValue = 70
RSIPeriod = 14

REM Original RSI values
RSIOri = RSI[RSIPeriod](close)
UPOri = MAX(0, close - close[1]) //higher close then previous
DOWNOri = MAX(0, close[1] - close) //lower close then previous
upMAOri = wilderAverage[RSIPeriod](UPOri)
downMAOri = wilderAverage[RSIPeriod](DOWNOri)


REM Reversed Engineered RSI Value to Price
RSRev = (100/((-1*RSIRevValue)+100))-1

if RSIRevValue < RSIOri THEN
 upMARev = upMAOri*(1-(1/RSIPeriod))
 downMARev = upMARev/RSRev
 DOWNRev = (downMARev - (downMAOri * (1-(1/RSIPeriod))))/(1/RSIPeriod)
 RSIPriceRev = close - DOWNRev
elsif RSIRevValue > RSIOri THEN
 downMARev = downMAOri*(1-(1/RSIPeriod))
 upMARev = downMARev*RSRev
 UPRev = (upMARev - (upMAOri * (1-(1/RSIPeriod))))/(1/RSIPeriod)
 RSIPriceRev = close + UPRev
endif

RETURN RSIPriceRev as "RSIPriceRev"

Download
Filename: RSI_RevEngineering.itf
Downloads: 344
Louis Winthorp III
Louis Winthorp III Average
Developer by day, aspiring writer by night. Still compiling my bio... Error 404: presentation not found.
Author’s Profile

Comments

imorandin
5 years ago
#

Hi!, Nice code. I'm tryng to port it to another language, but I don't understand this part: upMAOri = wilderAverage[RSIPeriod](UPOri) downMAOri = wilderAverage[RSIPeriod](DOWNOri) UpOri and DOWNOri seems to be prices (float) but wilderAverage function expects a collection of prices, right? can you explain? Thanks!, Ignacio

AdriTrade
8 years ago
#

Good job Louis!! How could do this for the Williams indicator? Thank you very much.

Kosuda76
8 years ago
#

Thanks for your reply! But I do not really understand what the opposite of them the values ​​you entered. ;-(

Louis Winthorp III
8 years ago
#

Hi Kosuda76, have you downloaded the rsi_revengineering.itf file? Then you can set any value you want. (The example code above contains hard coded 70 and 14 values)

Kosuda76
8 years ago
#

Hi Louis! This indicator has helped me a lot, has tried to get the RSI 30 extracted in the graph without success. Can you help me?

Matt B
8 years ago
#

Thank you Louis. I just download, Which system do you recommend ?

Louis Winthorp III
8 years ago
#

Hi Matt, there is not a specific system. For traders using the RSI in their setup, with this indicator they can see which share price is needed on the next bar to achieve a certain value RSI value. Let's say the RSI(x) is currently on 76, and you want to know the share price the next bar if the RSI would touch the 80 line. The indicator gives you the needed share price.

ProRealCode ProRealCode
Loading...