Supertrend Extended : demende de screener

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #139619 quote
    finplusfinplus
    Participant
    Master

    Bonjour, serait il possible d’avoir un screener à partir de cet indicateur qui recenserait les “drawarrowup” et les drawarrowdown?

    merci d’avance.

    //PRC_SuperTrend Extended | indicator
    //31.10.2017
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
     
    // --- settings
    //multiplier=2.236
    //period=66
    //type=1 //1 = use ATR , 2 = Use standard deviation , 3 = Use standard error
    //midperiod=10
    // --- end of settings
     
    type=max(1,type)
    if type=1 then
     moy=averagetruerange[period](close)
    elsif type=2 then
     moy=std[period](close)
    elsif type=3 then
     moy=ste[period](close)
    endif
     
    price=(highest[midperiod](high)+lowest[midperiod](low))/2
    up=price+multiplier*moy
    dn=price-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=price+multiplier*moy
    endif
    if flagh=1 then
     dn=price-multiplier*moy
    endif
    if trend=1 then
     mysupertrend=dn
     offset=moy
     color1=0
     color2=191
     color3=255
    else
     mysupertrend=up
     offset=-moy
     color1=255
     color2=69
     color3=0
    endif
     
    drawcandle(mysupertrend,mysupertrend+offset,mysupertrend,mysupertrend+offset) coloured(color1,color2,color3,50)bordercolor(100,100,100,0)
     
    if trend=1 and trend[1]<>1 then
     drawarrowup(barindex,mysupertrend) coloured(color1,color2,color3)
    endif
    if trend=-1 and trend[1]<>-1 then
     drawarrowdown(barindex,mysupertrend) coloured(color1,color2,color3)
    endif
     
    return mysupertrend coloured (color1,color2,color3) as "SuperTrend Extended 1", mysupertrend+offset coloured (color1,color2,color3) as "SuperTrend Extended 2"
    #139653 quote
    NicolasNicolas
    Keymaster
    Legend

    Ci-joint le screener pour le  Supertrend Extended. Dans la colonne de tri, “signal” retourne un 1 pour signal haussier et -1 pour un signal baissier :

    //PRC_SuperTrend Extended | screener
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
     
    // --- settings
    multiplier=2.236
    period=66
    type=1 //1 = use ATR , 2 = Use standard deviation , 3 = Use standard error
    midperiod=10
    // --- end of settings
     
    type=max(1,type)
    if type=1 then
    moy=averagetruerange[period](close)
    elsif type=2 then
    moy=std[period](close)
    elsif type=3 then
    moy=ste[period](close)
    endif
     
    price=(highest[midperiod](high)+lowest[midperiod](low))/2
    up=price+multiplier*moy
    dn=price-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=price+multiplier*moy
    endif
    if flagh=1 then
    dn=price-multiplier*moy
    endif
    
     
    //drawcandle(mysupertrend,mysupertrend+offset,mysupertrend,mysupertrend+offset) coloured(color1,color2,color3,50)bordercolor(100,100,100,0)
     signal=0
    if trend=1 and trend[1]<>1 then
    signal=1
    //drawarrowup(barindex,mysupertrend) coloured(color1,color2,color3)
    endif
    if trend=-1 and trend[1]<>-1 then
    signal=-1//drawarrowdown(barindex,mysupertrend) coloured(color1,color2,color3)
    endif
    
    screener[signal<>0](signal)
    supertend-extended-scanner.png supertend-extended-scanner.png
    #139692 quote
    finplusfinplus
    Participant
    Master

    Merci.

    #207912 quote
    gioportgioport
    Participant
    Average

    Désolé, mais lors de la création de l'écran, cette erreur m'a donné …. Qui peut m'aider à réparer …. Cantone di Grazie

    #208066 quote
    NicolasNicolas
    Keymaster
    Legend

    En effet “price” est désormais un mot réservé par le langage de programmation, voici une version corrigée de ce screener:

    //PRC_SuperTrend Extended | screener
    //Nicolas @ www.prorealcode.com
    //Sharing ProRealTime knowledge
     
    // --- settings
    multiplier=2.236
    period=66
    type=1 //1 = use ATR , 2 = Use standard deviation , 3 = Use standard error
    midperiod=10
    // --- end of settings
     
    type=max(1,type)
    if type=1 then
    moy=averagetruerange[period](close)
    elsif type=2 then
    moy=std[period](close)
    elsif type=3 then
    moy=ste[period](close)
    endif
     
    iprice=(highest[midperiod](high)+lowest[midperiod](low))/2
    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=price+multiplier*moy
    endif
    if flagh=1 then
    dn=price-multiplier*moy
    endif
    
     
    //drawcandle(mysupertrend,mysupertrend+offset,mysupertrend,mysupertrend+offset) coloured(color1,color2,color3,50)bordercolor(100,100,100,0)
     signal=0
    if trend=1 and trend[1]<>1 then
    signal=1
    //drawarrowup(barindex,mysupertrend) coloured(color1,color2,color3)
    endif
    if trend=-1 and trend[1]<>-1 then
    signal=-1//drawarrowdown(barindex,mysupertrend) coloured(color1,color2,color3)
    endif
    
    screener[signal<>0](signal)
    #208145 quote
    gioportgioport
    Participant
    Average

    Merci beaucoup maintenant ça marche vraiment bien……

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

Supertrend Extended : demende de screener


ProScreener : Scanners de Marché & Détection

New Reply
Author
author-avatar
finplus @finplus Participant
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by gioportgioport
3 years, 8 months ago.

Topic Details
Forum: ProScreener : Scanners de Marché & Détection
Language: French
Started: 07/19/2020
Status: Active
Attachments: 1 files
ProRealCode ProRealCode
Loading...