Making of stochastic rsi
Forums › ProRealTime English forum › ProBuilder support › Making of stochastic rsi
- This topic has 6 replies, 2 voices, and was last updated 7 years ago by Nicolas.
-
-
12/05/2016 at 8:50 AM #17792
Hi everyone.
I have used tradingview as a technical analesys platform before with great sucsess in brent crude manual trading.
This system is the same as my brent crude oil strategy made and put on the forum here.
As many know I stopped the automaded trading due to release of v.10.3 to IG.com
My question is if there is anybidy who knows how to make a stochastick rsi to prt(same as in tradingview)?
Manualy it work insane great but with the human touch to it. This is some what difficult in prt but i belive if i had the stochastic rsi it would work better.
Can anyone help?
Rules are if price is over smoothed moving avrage 60 or 70 u buy when stochastic rsi is crossed in the under 20 level on indicator end same for short but stoch value crosses over 80 level and price under smooth moving avrage 60 or 70.
The human touch is that the degree off steepness/price has to trend , how can we make this in a program?
With this and set off rules this can be done manualy in 5/15/30 and 1houers charts and has tons of oppertuneties for moneymaking pr. Day. Cant wait for for v. 10.3 and if somebody hasvthe opertunety to test my oil strategy in 10.3 would be nice.
Sorry for alotof talk here but primary question.is making of a stochastic rsi (same as in tradingview)
12/05/2016 at 9:29 AM #17795Here I put out the manual trading trigger point you get(screener) for tradingview if anyone is intrested’
strategy(title=”Stochastic RSI”, shorttitle=”Stoch RSI”)
smoothK = input(10, minval=1)
smoothD = input(3, minval=1)
lengthRSI = input(10, minval=1)
lengthStoch = input(10, minval=1)
src = input(close, title=”RSI Source”)
target=input(50,minval=1)
stop=input(50,minval=1)rsi1 = rsi(src, lengthRSI)
k = sma(stoch(rsi1, rsi1, rsi1, lengthStoch), smoothK)
d = sma(k, smoothD)
plot(k, color=blue)
plot(d, color=orange)
h0 = hline(80)
h1 = hline(20)
fill(h0, h1, color=purple, transp=80)price = close
len = input(50, minval=1, title=”Length”)
src_smma = input(close, title=”Source”)
smma = na(smma[1]) ? sma(src_smma, len) : (smma[1] * (len – 1) + src_smma) / lenDOWN = price < smma
UP = price > smmastochcross = cross(d,k) or cross(k,d)
short = d >=80 and stochcross
long = d <= 20 and stochcross
shortplot= short*100
longplot= long*100
plot(shortplot,”short”,color=red, linewidth=1)
plot(longplot,”long”,color=blue)12/05/2016 at 9:49 AM #17797The stochastic RSI code can be find here: Stochastic RSI for ProRealTime
Please not that this one make use of High/Low and maybe you should use Close/Close instead (for highest and lowest @ lines 2 and 3).
12/05/2016 at 11:43 AM #17813Ah. Thanx.:)
But i see it has no k and d line.
In trading view this can be adjusted.
Anyone has any idea of how you can make this?
Its to make it more adjustable to the instrument used.
12/05/2016 at 4:20 PM #17822The K% is only the moving average of the stochastic (to smooth the result) and the D% the signal line of the K%, another moving average, so the code would be:
123456789101112131415lengthRSI = 10 //RSI periodlengthStoch = 10smoothK = 10smoothD = 3myRSI = RSI[lengthRSI](close)MinRSI = lowest[lengthStoch](myrsi)MaxRSI = highest[lengthStoch](myrsi)StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)K = average[smoothK](stochrsi)D = average[smoothD](K)return K, DPlease note that I have changed the whole code accordingly to what I’m thinking the pinescript does.
12/06/2016 at 7:29 AM #17849That was real quick Nicolas 🙂
I just tested it. Looks exacly the same as in tradingview.
Thanx 🙂 much apriciated
12/06/2016 at 11:24 AM #17859Added to the Library for everyone benefit: stochastic RSI
-
AuthorPosts
Find exclusive trading pro-tools on