Super trend indicatore

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #222089 quote
    Ciccarelli Franco
    Participant
    Junior

    Roberto buongiorno,

    scusa il disturbo, ti faccio l’ennesima richiesta di SREENER, questa volta dall’indicatore Super trend.

     

    a = 1 //Key Vaule. ‘This changes the sensitivity’
    c = 10 //ATR Period

    multiplier=a
    period=c

    moy=averagetruerange[period](close)
    iprice=totalprice
    up=iprice+multiplier*moy
    dn=iprice-multiplier*moy
    once trend=1
    if close>up[1] then
    trend=1
    elsif close<dn[1] then
    trend=-1
    endif
    if trend<0 and trend[1]>0 then
    flag=1
    else
    flag=0
    endif
    if trend>0 and trend[1]<0 then
    flagh=1
    else
    flagh=0
    endif
    if trend>0 and dn<dn[1] then
    dn=dn[1]
    endif
    if trend<0 and up>up[1] then
    up=up[1]
    endif
    if flag=1 then
    up=iprice+multiplier*moy
    endif
    if flagh=1 then
    dn=iprice-multiplier*moy
    endif
    if trend=1 then
    mysupertrend=dn
    else
    mysupertrend=up
    endif
    if mysupertrend > mysupertrend[1] then
    color1=0
    color2=255
    color3=0
    elsif mysupertrend < mysupertrend[1] then
    color1=255
    color2=0
    color3=0
    endif

    if iprice crosses over mysupertrend then
    drawarrowup(barindex,mysupertrend) coloured(“green”)
    endif
    if iprice crosses under mysupertrend then
    drawarrowdown(barindex,mysupertrend) coloured(“red”)
    endif

    return mysupertrend coloured (color1,color2,color3) as “SuperTrend”

     

    Grazie

    #222178 quote
    Nicolas
    Keymaster
    Master

    ecco un codice di screening che controlla i cambiamenti di colore del supertrend:

    st = supertrend[3,10]
    screener[ close crosses over st or close crosses under st ]
    #222186 quote
    Ciccarelli Franco
    Participant
    Junior

    Scusa lo devo mettere in fondo al codice?

    #222188 quote
    Nicolas
    Keymaster
    Master

    No, questo è il codice completo per la tua query di screening. Il supertrend è un'istruzione interna, non è necessario ricodificarlo da zero come nel codice fornito.

    #222231 quote
    Ciccarelli Franco
    Participant
    Junior

    Grazie , molto gentile.

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

Super trend indicatore


ProScreener: Scansione Mercati & Screener

New Reply
Summary

This topic contains 4 replies,
has 2 voices, and was last updated by Ciccarelli Franco
2 years, 4 months ago.

Topic Details
Forum: ProScreener: Scansione Mercati & Screener
Language: Italian
Started: 10/06/2023
Status: Active
Attachments: No files
Logo Logo
Loading...