John Ehler's Rocket RSI
Forums › ProRealTime English forum › ProBuilder support › John Ehler's Rocket RSI
- This topic has 4 replies, 2 voices, and was last updated 6 years ago by Despair.
Viewing 5 posts - 1 through 5 (of 5 total)
-
-
05/03/2018 at 4:24 PM #69736
Here is a version John Ehler’s Rocket RSI – originally from this May’s 2018 issue of Stocks & Commodities Magazine – and found on Trading View com, if anyone could modify the code for PRT?
https://www.tradingview.com/script/VXOLWM61-Rocket-RSI/
Thanks
BardRocket RSI12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061//@version=3// Copyright (c) 2018-present, Alex Orekhov (everget)// Rocket RSI indicator script may be freely distributed under the MIT license.study("Rocket RSI", shorttitle="Rocket RSI")rsiLength = input(title="RSI Length", type=integer, defval=10, minval=1)smoothingLength = input(title="Smoothing Length", type=integer, defval=8, minval=1)obosLevel = input(title="Overbought / Oversold Level", type=float, defval=2.0, minval=0.0)applyNormalization = input(title="Apply Normalization to [-100, 100] values ?", type=bool, defval=false)src = input(title="Source", type=source, defval=close)PI = 2 * asin(1)a1 = 0.0b1 = 0.0c1 = 0.0c2 = 0.0c3 = 0.0// Compute Super Smoother coefficientsa1 := exp(-1.414 * PI / smoothingLength)b1 := 2 * a1 * cos(1.414 * 180 / smoothingLength)c2 := b1c3 := -a1 * a1c1 := 1 - c2 - c3// Create half dominant cycle momentummom = change(src, rsiLength - 1)// Super Smoother Filterssf = 0.0ssf := c1 * (mom + nz(mom[1])) / 2 + c2 * nz(ssf[1]) + c3 * nz(ssf[2])// Accumulate <code>Closes Up</code> and <code>Closes DownupSum = sum(change(ssf, 1) > 0 ? change(ssf, 1) : 0.0, rsiLength)downSum = sum(change(ssf, 1) > 0 ? 0.0 : abs(change(ssf, 1)), rsiLength)tmpRSI = 0.0tmpRSI := upSum + downSum != 0 ? (upSum - downSum) / (upSum + downSum) : nz(tmpRSI[1])// Limit RocketRSI output to +/-3 Standard Deviationsif tmpRSI > 0.999tmpRSI := 0.999if tmpRSI < -0.999tmpRSI := -0.999// Apply Fisher Transform to establish Gaussian Probability DistributionrocketRSI = 0.5 * log((1 + tmpRSI) / (1 - tmpRSI))rocketRSI := applyNormalization ? rocketRSI * 25 : rocketRSIoverboughtLevel = applyNormalization ? obosLevel * 25 : obosLeveloversoldLevel = applyNormalization ? obosLevel * -25 : obosLevel * -1rocketRSIColor = rocketRSI > overboughtLevel ? green : rocketRSI < oversoldLevel ? red : #ff9370plot(rocketRSI, title="RRSI", linewidth=2, color=rocketRSIColor, transp=0)plot(overboughtLevel, title="OB Level", style=circles, color=#3d85c6, transp=0)hline(0, title="Zero Level", linestyle=dotted)plot(oversoldLevel, title="OS Level", style=circles, color=#3d85c6, transp=0)05/03/2018 at 5:04 PM #6974105/04/2018 at 9:41 AM #6977505/04/2018 at 11:56 AM #6978005/04/2018 at 12:10 PM #69784Thanks, I found the the indicator in traders tips for this month.
Here is the code in case you are impatient and can’t wait for Nicolas to approve it for the library:
RocketRSI1234567891011121314151617181920212223242526272829303132333435363738394041424344// RSILength = 10// SmoothLength = 10// OBOSLevel = 2//Compute Super Smoother coefficients onceif barindex = 1 thena1 = exp( -1.414 * 3.14159/ ( SmoothLength ) )b1 = 2 * a1 * Cos( 1.414 * 180/ ( SmoothLength ) )c2 = b1c3 = -square(a1)c1 = 1 - c2 - c3endifif barindex > RSILength then//Create half dominant cycle MomentumMom = Close - Close[RSILength - 1]//SuperSmoother FilterFilt = c1 * ( Mom + Mom[1] ) / 2 + c2 * Filt[1] + c3 * Filt[2]//Accumulate "Closes Up" and "Closes Down"CU = 0CD = 0for count = 0 to RSILength -1 doif Filt[count] - Filt[count + 1] > 0 thenCU = CU + Filt[count] - Filt[count + 1]endifif Filt[count] - Filt[count + 1] < 0 thenCD = CD + Filt[count + 1] - Filt[count]endifnextif CU + CD <> 0 thenMyRSI = ( CU - CD ) / ( CU + CD )endif//Limit RocketRSI output to//+/- 3 Standard DeviationsMyRSI = min(max(MyRSI,-.999),.999)//Apply Fisher Transform to establish//Gaussian Probability DistributionRocketRSI = .5 * Log( ( 1 + MyRSI ) / ( 1 - MyRSI ) )endifreturn RocketRSI coloured(0,0,255) as "RocketRSI", 0 as "Zero Line", OBOSLevel coloured(255,0,0) as "OverBought", -OBOSLevel coloured(255,0,0) as "OverSold"3 users thanked author for this post.
-
AuthorPosts
Viewing 5 posts - 1 through 5 (of 5 total)
Find exclusive trading pro-tools on
Similar topics: