Making of stochastic rsi

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #17792 quote
    Kenneth Kvistad
    Participant
    Senior

    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)

    #17795 quote
    Kenneth Kvistad
    Participant
    Senior

    Here 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) / len

    DOWN = price < smma
    UP = price > smma

    stochcross = 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)

    #17797 quote
    Nicolas
    Keymaster
    Master

    The 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).

    #17813 quote
    Kenneth Kvistad
    Participant
    Senior

    Ah. 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.

    #17822 quote
    Nicolas
    Keymaster
    Master

    The 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:

    lengthRSI = 10 //RSI period
    lengthStoch = 10
    smoothK = 10
    smoothD = 3
    
    myRSI = 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, D

    Please note that I have changed the whole code accordingly to what I’m thinking the pinescript does.

    stochastic-rsi-prorealtime.png stochastic-rsi-prorealtime.png
    #17849 quote
    Kenneth Kvistad
    Participant
    Senior

    That was real quick Nicolas 🙂

    I just tested it. Looks exacly the same as in tradingview.

    Thanx 🙂 much apriciated

    #17859 quote
    Nicolas
    Keymaster
    Master

    Added to the Library for everyone benefit: stochastic RSI

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.

Making of stochastic rsi


ProBuilder: Indicators & Custom Tools

New Reply
Author
Summary

This topic contains 6 replies,
has 2 voices, and was last updated by Nicolas
9 years, 2 months ago.

Topic Details
Forum: ProBuilder: Indicators & Custom Tools
Language: English
Started: 12/05/2016
Status: Active
Attachments: No files
Logo Logo
Loading...