The StepRSI or the Step Relative Strength Index oscillator is made of a classic RSI with 2 others lines that are calculated upon its variation, the “step RSI fast” and the “step RSI slow”. These 2 lines are changing their values by doing steps, if the RSI has made variations of the “StepSize” parameters. This indicator can be used in different ways : breakout of RSI zone made by the RSI step lines or just use it as a filter of the whipsaws of the original oscillator. This indicator has been converted from MT4 version.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
//PRC_StepRSI | indicator //25.12.2016 //Nicolas @ www.prorealcode.com //Sharing ProRealTime knowledge //Converted from MT4 version // --- parameters //RSIPeriod=14 //StepSizeFast=5 //StepSizeSlow=15 // --- Price=customclose if barindex>RSIPeriod then RSIBuffer=RSI[RSIPeriod](Price) smax=RSIBuffer +2.0*StepSizeFast smin=RSIBuffer -2.0*StepSizeFast trend=trend[1] if (trend[1]<=0 and RSIBuffer>smax[1]) then trend=1 endif if (trend[1]>=0 and RSIBuffer<smin[1]) then trend=-1 endif if(trend>0) then if(smin<smin[1]) then smin=smin[1] endif result=smin+StepSizeFast endif if(trend<0) then if(smax>smax[1]) then smax=smax[1] endif result=smax-StepSizeFast endif FastBuffer = result smaxSlow=RSIBuffer +2.0*StepSizeSlow sminSlow=RSIBuffer -2.0*StepSizeSlow trendSlow=trendSlow[1] if (trendSlow[1]<=0 and RSIBuffer>smaxSlow[1]) then trendSlow=1 endif if (trendSlow[1]>=0 and RSIBuffer<sminSlow[1]) then trendSlow=-1 endif if(trendSlow>0) then if(sminSlow<sminSlow[1]) then sminSlow=sminSlow[1] endif result=sminSlow+StepSizeSlow endif if(trendSlow<0) then if(smaxSlow>smaxSlow[1]) then smaxSlow=smaxSlow[1] endif result=smaxSlow-StepSizeSlow endif SlowBuffer = result endif RETURN RSIBuffer as "RSI", FastBuffer as "Fast Step RSI", SlowBuffer as "Slow Step RSI", 50 as "level 50", 30 as "level 30", 70 as "level 70" |
Share this
No information on this site is investment advice or a solicitation to buy or sell any financial instrument. Past performance is not indicative of future results. Trading may expose you to risk of loss greater than your deposits and is only suitable for experienced investors who have sufficient financial means to bear such risk.
ProRealTime ITF files and other attachments :PRC is also on YouTube, subscribe to our channel for exclusive content and tutorials
Gracias Nicolas, muy buen indicador
Nicolas what do you think of these modifications for 233 tick charts ? cheers Steve.
A=CCI[6](TOTALPRICE)
B=TEMA[1000](A)
C=(RSI[500](B)-50)*15
StepSizeFast=6
StepSizeSlow=12
if barindex>C then
RSIBuffer=C
smax=RSIBuffer +2.0*StepSizeFast
smin=RSIBuffer -2.0*StepSizeFast
trend=trend[1]
if (trend[1]<=0 and RSIBuffer>smax[1]) then
trend=1
endif
if (trend[1]>=0 and RSIBuffer<smin[1]) then
trend=-1
endif
if(trend>0) then
if(smin<smin[1]) then
smin=smin[1]
endif
result=smin+StepSizeFast
endif
if(trend<0) then
if(smax>smax[1]) then
smax=smax[1]
endif
result=smax-StepSizeFast
endif
FastBuffer = result
smaxSlow=RSIBuffer +2.0*StepSizeSlow
sminSlow=RSIBuffer -2.0*StepSizeSlow
trendSlow=trendSlow[1]
if (trendSlow[1]<=0 and RSIBuffer>smaxSlow[1]) then
trendSlow=1
endif
if (trendSlow[1]>=0 and RSIBuffer<sminSlow[1]) then
trendSlow=-1
endif
if(trendSlow>0) then
if(sminSlow<sminSlow[1]) then
sminSlow=sminSlow[1]
endif
result=sminSlow+StepSizeSlow
endif
if(trendSlow<0) then
if(smaxSlow>smaxSlow[1]) then
smaxSlow=smaxSlow[1]
endif
result=smaxSlow-StepSizeSlow
endif
SlowBuffer = result
endif
RETURN RSIBuffer,FastBuffer,SlowBuffer,0
Thanks for this modification, I still do not have tested it, where did you get this idea to build a RSI from a long term period TEMA of a CCI?
Trial and error from study of indicators call it coding mad science was trying to find an indicator close to price pattern but with useful divergence still like most indicators not much good in strong trends as you will discover Nicolas.
Nice! Thanks 🙂