How to call Stochastic RSI indicator

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #148575 quote
    Bart_11235Bart_11235
    Participant
    New

    I’m still new to PRT, so I have simple question.

    I would like to use the Stochastic RSI indicator (the existing build-in version) in a backtest. I tried: indicator = call “Stochastic RSI” , but this does not work as it can not find the indicator. It does not seem to be in the formula list either.

    Can you help me with this? thanks!

    #148583 quote
    Bart_11235Bart_11235
    Participant
    New

    NB: I just made my own Indicator using the code from https://www.prorealcode.com/topic/prt_stochastic-rsi-v1-1/ which seems have the same result.

    However, this takes quite some computing power. Is there another or faster solution?

    #148585 quote
    nonethelessnonetheless
    Participant
    Master

    Pretty sure that using CALL just brings up the same code, but I find it faster and simpler to build it in to your algo – and a lot easier to optimize:

    //Stochastic RSI | indicator
    lengthRSI = lr //RSI period
    lengthStoch = ls //Stochastic period
    smoothK = sk //Smooth signal of stochastic RSI
    smoothD = sd //Smooth signal of smoothed stochastic RSI
    myRSI = RSI[lengthRSI](close)
    MinRSI = lowest[lengthStoch](myrsi)
    MaxRSI = highest[lengthStoch](myrsi)
    StochRSI = (myRSI-MinRSI) / (MaxRSI-MinRSI)
    K = average[smoothK](stochrsi)*100
    D = average[smoothD](K)
     
    c1 = K>D
    c2 = K<D
    Nicolas thanked this post
    #148638 quote
    Bart_11235Bart_11235
    Participant
    New

    Thanks, all clear.

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

Stuck on this ProBuilder code?

Describe what this topic is trying to build, in plain English, and ProRealAI writes the ProRealTime™ indicator, screener or system for you.

Available in 7 languages
Try ProRealAI

How to call Stochastic RSI indicator


ProOrder: Automated Strategies & Backtesting

New Reply
Author
author-avatar
Bart_11235 @bart_11235 Participant
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Bart_11235Bart_11235
5 years, 11 months ago.

Topic Details
Forum: ProOrder: Automated Strategies & Backtesting
Language: English
Started: 10/26/2020
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...