traduzione codice TW Parabolic Sar Zone

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #238751 quote
    Msport71Msport71
    Participant
    Senior

    Buongiorno a tutti,

    volevo chiedere cortese traduzione del seguente codice che interpreta graficamente  in maniera un po’ diversa dal consueto il parabolic sar.

    Grazie  per il prezioso aiuto.

    https://www.tradingview.com/script/tABUf27g-Parabolic-SAR-Zone/

    // © OmegaTools

    //@version=5
    indicator(“Parabolic SAR Zone”, overlay = true)

    start = input.float(0.02, “Starting value”)
    inc = input.float(0.02, “Increment”)
    max = input.float(0.02, “Max Value”)
    width = input.float(1.00, “Zone width”)

    atrs = ta.atr(100) * width
    sarone = ta.sar(start, inc, max)
    sarzone = if close > sarone
    sarone + atrs
    else if close < sarone
    sarone – atrs
    sartwo = ta.sar(start/2, inc/2, max/2)

    p1 = plot(sarone, “First SAR”, color = close > sarone ? #2962ff : #e91e63, style=plot.style_circles)
    p3 = plot(sarzone, “Zone line”, color = close > sarone ? #2962ff : #e91e63, style=plot.style_circles)
    fill(p1, p3, color = close > sarone ? color.new(#2962ff, 80) : color.new(#e91e63, 80))

    plot(sartwo, “Second SAR”, color = close > sartwo ? color.new(#2962ff, 50) : color.new(#e91e63, 50), style=plot.style_linebr)

    Screenshot-2024-10-09-at-10-27-41-Parabolic-SAR-Zone-—-Indicator-by-OmegaTools-—-TradingView.png Screenshot-2024-10-09-at-10-27-41-Parabolic-SAR-Zone-—-Indicator-by-OmegaTools-—-TradingView.png
    #238761 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Ecco il codice:

    //----------------------------------------//
    //PRC_Parabolic SAR Zone
    //version = 0
    //09.10.24
    //Iván González @ www.prorealcode.com
    //Sharing ProRealTime knowledge
    //----------------------------------------//
    //-------------Inputs---------------------//
    //----------------------------------------//
    start=0.02
    inc=0.02
    maxvalue=0.02
    width=1
    //----------------------------------------//
    //-------Average True Range---------------//
    //----------------------------------------//
    atrs = averagetruerange[100](close)*width
    //----------------------------------------//
    //-------Parabolic SAR 1------------------//
    //----------------------------------------//
    psar1 = SAR[start,inc,maxvalue]
    //----------------------------------------//
    //-------Parabolic Zone-------------------//
    //----------------------------------------//
    if close > psar1 then
    psarzone = psar1+atrs
    red=41
    green=98
    blue=255
    elsif close < psar1 then
    psarzone = psar1-atrs
    red=233
    green=30
    blue=99
    endif
    colorbetween(psar1,psarzone,red,green,blue,35)
    //----------------------------------------//
    //-------Parabolic SAR 2------------------//
    //----------------------------------------//
    psar2 = sar[start/2,inc/2,maxvalue/2]
    
    if close>psar2 then
    red2=41
    green2=98
    blue2=255
    else
    red2=233
    green2=30
    blue2=99
    endif 
    //----------------------------------------//
    return psar1 as "PSAR 1" coloured(red,green,blue) style(point,2), psar2 as "PSAR 2" coloured(red2,green2,blue2), psarzone as "Zone line" coloured(red,green,blue) style(point,2)
    #238767 quote
    Msport71Msport71
    Participant
    Senior

    Grazie e mille super fast!

Viewing 3 posts - 1 through 3 (of 3 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 Parabolic Sar Zone


ProBuilder: Indicatori & Strumenti Personalizzati

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

This topic contains 2 replies,
has 2 voices, and was last updated by Msport71Msport71
1 year, 11 months ago.

Topic Details
Forum: ProBuilder: Indicatori & Strumenti Personalizzati
Language: Italian
Started: 10/09/2024
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...