Indicateur SuperTrend multitimeframe en couleurs

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #258818 quote
    Benoit Rolland
    Participant
    New

    bonjour

    je ne sais pas code mais si quelqu un pouvait me coder un indicateur avec les caracteristiques suivantes :

    graphique en journalier

    sur nouveau panneau

    prix superieur au supertrend mensuel, hebdo, journalier en bleu fonce

    prix superieur au supertrend mensuel, hebdo en bleu moyen

    prix superieur au supertrend mensuel en bleu clair

    prix inferieur au supertrend mensuel en rouge

    prix inferieur au supertrend mensuel, hebdo en rouge

    prix inferieur au supertrend mensuel, hebdo, journalier en noir

    en barre ou histogramme


    je sais pas si ma demande est correcte comprehensible ou faisable; je remercie toute la communaute pour votre ecoute et bienveillance

    cordialement benoit le catalan

    #258823 quote
    robertogozzi
    Moderator
    Master

    Voici le code :

    // SuperTrend MTF en couleurs
    //
    // https://www.prorealcode.com/topic/supertrend-en-couleur/
    //
    // returned histogram values:
    //  1 = close above Daily ST
    //  3 = close above Daily and Monthly ST
    //  5 = close above Daily, Monthly and Weekly ST
    //
    // -1 = close below Daily ST
    // -3 = close below Daily and Monthly ST
    // -5 = close below Daily, Monthly and Weekly ST
    
    //
    Timeframe(monthly)
    mST = Supertrend[3,10]
    //
    Timeframe(weekly)
    wST = Supertrend[3,10]
    //
    Timeframe(daily)
    dST = Supertrend[3,10]
    //
    Timeframe(default)
    AboveM     = (close > mST)
    BelowM     = (close < mST)
    //
    AboveW     = (close > wST)
    BelowW     = (close < wST)
    //
    AboveD     = (close > dST)
    BelowD     = (close < dST)
    //
    Cond      = 0
    IF AboveD THEN
       Cond = 1
       IF AboveM THEN
          Cond = 3
          IF AboveW THEN
             Cond = 5
          ENDIF
       ENDIF
    ELSIF BelowD THEN
       Cond = -1
       IF BelowM THEN
          Cond = -3
          IF BelowW THEN
             Cond = -5
          ENDIF
       ENDIF
    ENDIF
    RETURN Cond AS "Condizione ABOVE=1,3,5, BELOW=-1,-3,-5"
    
    
    
    SuperTrend-MTF-en-couleurs.itf SuperTrend-MTF-en-couleurs.jpg SuperTrend-MTF-en-couleurs.jpg
    #258824 quote
    robertogozzi
    Moderator
    Master

    Désolé, j’avais oublié les différentes couleurs que vous aviez demandées, voici le code modifié :

    // SuperTrend MTF en couleurs
    //
    // https://www.prorealcode.com/topic/supertrend-en-couleur/
    //
    // returned histogram values:
    //  1 = close above Daily ST
    //  3 = close above Daily and Monthly ST
    //  5 = close above Daily, Monthly and Weekly ST
    //
    // -1 = close below Daily ST
    // -3 = close below Daily and Monthly ST
    // -5 = close below Daily, Monthly and Weekly ST
    
    //
    Timeframe(monthly)
    mST = Supertrend[3,10]
    //
    Timeframe(weekly)
    wST = Supertrend[3,10]
    //
    Timeframe(daily)
    dST = Supertrend[3,10]
    //
    Timeframe(default)
    AboveM     = (close > mST)
    BelowM     = (close < mST)
    //
    AboveW     = (close > wST)
    BelowW     = (close < wST)
    //
    AboveD     = (close > dST)
    BelowD     = (close < dST)
    //
    Cond      = 0
    a         = 0
    r         = 0
    g         = 0
    b         = 0
    IF AboveD THEN
       a    = 50
       r    = 0
       g    = 0
       b    = 139
       Cond = 1
       IF AboveM THEN
          Cond = 3
          a    = 160
          IF AboveW THEN
             Cond = 5
             a    = 255
          ENDIF
       ENDIF
    ELSIF BelowD THEN
       Cond = -1
       a    = 255
       IF BelowM THEN
          Cond = -3
          a    = 255
          r    = 255
          IF BelowW THEN
             Cond = -5
             a    = 255
          ENDIF
       ENDIF
    ENDIF
    
    RETURN Cond AS "Condizione ABOVE=1,3,5, BELOW=-1,-3,-5" style(histogram) coloured(r,g,b,a)
    
    
    
    Nicolas thanked this post
    SuperTrend-MTF-en-couleurs-1.itf SuperTrend-MTF-en-couleurs-1.jpg SuperTrend-MTF-en-couleurs-1.jpg
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.

Indicateur SuperTrend multitimeframe en couleurs


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by robertogozzi
3 hours, 30 minutes ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 03/06/2026
Status: Active
Attachments: 4 files
Logo Logo
Loading...