Stocastico Rsi completo delle due linee D e K

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #213864 quote
    StenozarStenozar
    Participant
    Master

    Buongiorno,

    è possibile avere il codice dell’indicatore Stocastico Rsi che visualizzi anche le linee D e K, cioè la linea lenta e quella veloce?

    Grazie

    Stefano

    #213881 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Lo stocastico RSI non ha due linee, almeno quello della piattaforma:

    DEFPARAM CalculateOnLastBars = 1000
    ONCE RsiP= 14
    MyRsi    = RSI[RsiP](close)
    MinRSI   = lowest[RsiP](MyRsi)
    MaxRSI   = highest[RsiP](MyRsi)
    StochRSI = ((MyRsi-MinRSI) / (MaxRSI-MinRSI)) * 100
    IF StochRSI < 0 THEN
       StochRSI = 0
    ENDIF
    IF StochRSI > 100 THEN
       StochRSI = 100
    ENDIF
    return StochRSI as "Stoch RSI",80 AS "80",20 AS "20"

    però ce l’ha questo di Nicolas (https://www.prorealcode.com/prorealtime-indicators/stochastic-rsi/):

    //PRC_Stochastic RSI | indicator
    //06.12.2016
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //converted and adapted from Pinescript version
     
    // -- parameters:
    lengthRSI = 15 //RSI period
    lengthStoch = 10 //Stochastic period
    smoothK = 10 //Smooth signal of stochastic RSI
    smoothD = 3 //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)
     
    return K as "K%", D as "D%"
Viewing 2 posts - 1 through 2 (of 2 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

Stocastico Rsi completo delle due linee D e K


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Stenozar @stenozar Participant
Summary

This topic contains 1 reply,
has 2 voices, and was last updated by robertogozzirobertogozzi
3 years, 5 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 04/30/2023
Status: Active
Attachments: No files
ProRealCode ProRealCode
Loading...