Traduzione codice TW Rsi Sar

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #247027 quote
    Msport71Msport71
    Participant
    Senior
    #247097 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Ecco qui:

    //------------------------------------------//
    //PRC_Parabolic RSI
    //version = 0
    //14.05.2025
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //------------------------------------------//
    // Inputs
    //------------------------------------------//
    len=14 // RSI Length
    upper=70 // Overbought level
    lower=30 // Oversold level
    
    increment = 0.02
    initial = 0.02
    limite = 0.2
    //------------------------------------------//
    // RSI calculation
    //------------------------------------------//
    src=rsi[len](close)
    //------------------------------------------//
    // Parabolic SAR (RSI)
    //------------------------------------------//
    srchigh=src+1
    srclow=src-1
    
    if barindex<=len+2 then
    Lparabolic=srclow
    islong=1
    af=limite
    hp=srchigh
    lp=srclow
    else
    if islong then
    Lparabolic=Lparabolic+af*(hp-Lparabolic)
    Lparabolic=min(Lparabolic,srclow[1])
    Lparabolic=min(Lparabolic,srclow[2])
    else
    Sparabolic=Sparabolic+af*(lp-Sparabolic)
    Sparabolic=max(Sparabolic,srchigh[1])
    Sparabolic=max(Sparabolic,srchigh[2])
    endif
    
    reverse=0
    
    if islong then
    if srclow<Lparabolic then
    isLong=0
    reverse=1
    Sparabolic=hp
    lp=srclow
    af=initial
    endif
    else
    if srchigh>Sparabolic then
    islong=1
    reverse=1
    Lparabolic=lp
    hp=srchigh
    af=initial
    endif
    endif
    
    if reverse=0 then
    if islong then
    if srchigh>hp then
    hp=srchigh
    af=af+increment
    af=min(af,limite)
    endif
    else
    if srclow<lp then
    lp=srclow
    af=af+increment
    af=min(af,limite)
    endif
    endif
    endif
    endif
    
    if islong then
    psarRSI=Lparabolic
    r=255
    g=82
    b=189
    else
    psarRSI=Sparabolic
    r=0
    g=255
    b=229
    endif
    //------------------------------------------//
    // Signals
    //------------------------------------------//
    sigUp=islong<>islong[1] and islong and psarRSI<=lower
    sigDn=islong<>islong[1] and islong=0 and psarRSI>=upper
    if sigUP or sigDn then
    drawpoint(barindex,psarRSI,5)coloured(r,g,b,90)
    endif
    
    //------------------------------------------//
    return src as "RSI" style(line,2), psarRSI as "Parabolic SAR rsi" style(point,2)coloured(r,g,b), upper as "OB level" style(dottedline),lower as "OS level" style(dottedline)
    
    Msport71 and Distincttacos thanked this post
    #247151 quote
    Ciccarelli FrancoCiccarelli Franco
    Participant
    Senior

    Non si vedono i quadratini sul grafico.

    #247165 quote
    robertogozzirobertogozzi
    Moderator
    Legend

    Si vedono dei pallini, invece dei quadratini (rombi), come vedi dalla foto X.

    Se preferisci i rombi (vedi foto Y), sostituisci l’intera riga dove c’è l’istruzione DRAWPOINT (basta che tu la commenti), con questa:

    drawtext("◆",barindex,psarRSI,dialog,bold,35)coloured(r,g,b,90)
    Iván González thanked this post
    x-1.jpg x-1.jpg y-1.jpg y-1.jpg
    #247170 quote
    Ciccarelli FrancoCiccarelli Franco
    Participant
    Senior

    Grazie

Viewing 5 posts - 1 through 5 (of 5 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

Traduzione codice TW Rsi Sar


ProBuilder: Indicatori & Strumenti Personalizzati

New Reply
Author
author-avatar
Msport71 @carlo-pasca Participant
Summary

This topic contains 4 replies,
has 4 voices, and was last updated by Ciccarelli FrancoCiccarelli Franco
1 year, 4 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 05/13/2025
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...