ProRealTime : couleur auto des boîtes Fibonacci 150/162

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #261083 quote
    Géraud Laveissiere
    Participant
    Average

    J’ai repris les parametres des vagues d’elliott de Nicolas en tracant les 150/162 et 250/262….j aimerai que des couleurs de boites ( en blanc par exemple avec transparence modulable ) 150/162 et 250/262 s’affichent en automatique. Voici le code du 150 puis celui du 162. Je n ai aucune idée ou placer la commende fillcolor dans ces codes. Merci.


    1-

    //PRC_Scalping with Parabolic SAR and Fibonacci | indicator

    //03.09.2019

    //Nicolas @ http://www.prorealcode.com

    //Sharing ProRealTime knowledge


    // — settings

    //plotbar=10 //bars duration for plotting the fib zones

    // — end of settings


    sarfast=SAR[0.02,0.02,0.2]

    sarslow=SAR[0.005,0.005,0.05]


    //colors

    if close>sarfast then //bullish trend

    r=0

    g=255

    else //bearish trend

    r=255

    g=0

    endif


    //highs and lows

    if close<sarfast then

    ll=min(ll,low)

    else

    hh=max(hh,high)

    endif


    if close>sarfast and close[1]<sarfast[1] then //new bullish signal

    fibo0=ll

    ll=sarslow //reset ll

    if close>sarslow then

    startbar=barindex

    irange=high-fibo0

    entry = fibo0+(irange/2)

    itarget = fibo0+irange*1.5

    istop = fibo0-2*pointsize

    //drawarrowup(startbar,fibo0) coloured(255,255,255)

    drawtext(“.”,barindex,entry-0.1*pointsize,dialog,bold,1) coloured(0,255,255)

    //drawtext(“sl”,barindex,istop-0.8*pointsize,dialog,bold,10) coloured(255,255,255)

    drawtext(“150”,barindex,itarget-0.02*pointsize,dialog,standard,12) coloured(250,250,250)

    endif

    endif

    if close<sarfast and close[1]>sarfast[1] then //new bearish signal

    fibo0=hh

    hh=0 //reset hh

    if close<sarslow then

    startbar=barindex

    irange=fibo0-low

    entry = fibo0-(irange/2)

    itarget = fibo0-irange*1.5

    istop = fibo0+2*pointsize

    //drawarrowdown(startbar,fibo0) coloured(255,255,0)

    drawtext(“.”,barindex,entry+0.5*pointsize,dialog,bold,1) coloured(0,255,255)

    //drawtext(“sl”,barindex,istop-0.8*pointsize,dialog,bold,10) coloured(255,255,255)

    drawtext(“150”,barindex,itarget-0.02*pointsize,dialog,standard,12) coloured(250,250,250)

    endif

    endif


    //plot fib zones

    if barindex-startbar<=plotbar then

    if close>sarslow then //bullish trend

    //drawsegment(startbar,istop,barindex,istop,5) coloured(0,250,0) //stoploss

    //drawsegment(startbar,entry,barindex,entry,3) coloured(0,0,0) //entry at 50% fibo

    drawsegment(startbar,itarget,barindex,itarget) coloured(250,250,255)STYLE(dottedline, 1) //target at 161.8% fibo

    endif

    if close<sarslow then //bearish trend

    //drawsegment(startbar,istop,barindex,istop,5) coloured(250,0,0) //stoploss

    //drawsegment(startbar,entry,barindex,entry,3) coloured(0,0,0) //entry at 50% fibo

    drawsegment(startbar,itarget,barindex,itarget) coloured(250,250,250)STYLE(dottedline, 1) //target at 161.8% fibo

    endif

    endif


    return


    2-

    //PRC_Scalping with Parabolic SAR and Fibonacci | indicator

    //03.09.2019

    //Nicolas @ http://www.prorealcode.com

    //Sharing ProRealTime knowledge


    // — settings

    //plotbar=10 //bars duration for plotting the fib zones

    // — end of settings


    sarfast=SAR[0.02,0.02,0.2]

    sarslow=SAR[0.005,0.005,0.005]


    //colors

    if close>sarfast then //bullish trend

    r=0

    g=255

    else //bearish trend

    r=255

    g=0

    endif


    //highs and lows

    if close<sarfast then

    ll=min(ll,low)

    else

    hh=max(hh,high)

    endif


    if close>sarfast and close[1]<sarfast[1] then //new bullish signal

    fibo0=ll

    ll=sarslow //reset ll

    if close>sarslow then

    startbar=barindex

    irange=high-fibo0

    entry = fibo0+(irange/2)

    itarget = fibo0+irange*1.618

    istop = fibo0-2*pointsize

    //drawarrowup(startbar,fibo0) coloured(255,255,255)

    drawtext(“b”,barindex,entry-0.01*pointsize,dialog,bold,5) coloured(255,255,255)

    drawtext(“.”,barindex,istop-1*pointsize,dialog,bold,1) coloured(255,255,255)

    drawtext(“162  “,barindex,itarget-0.4*pointsize,dialog,bold,15) coloured(255,255,255)

    endif

    endif

    if close<sarfast and close[1]>sarfast[1] then //new bearish signal

    fibo0=hh

    hh=0 //reset hh

    if close<sarslow then

    startbar=barindex

    irange=fibo0-low

    entry = fibo0-(irange/2)

    itarget = fibo0-irange*1.618

    istop = fibo0+2*pointsize

    //drawarrowdown(startbar,fibo0) coloured(255,255,0)

    drawtext(“s”,barindex,entry+2*pointsize,dialog,standard,5) coloured(255,255,255)

    drawtext(“.”,barindex,istop-0.8*pointsize,dialog,bold,10) coloured(255,255,255)

    drawtext(“162  “,barindex,itarget-0.4*pointsize,dialog,bold,12) coloured(255,255,255)

    endif

    endif


    //plot fib zones

    if barindex-startbar<=plotbar then

    if close>sarslow then //bullish trend

    //drawsegment(startbar,istop,barindex,istop) coloured(0,250,0) //stoploss

    //drawsegment(startbar,entry,barindex,entry) coloured(250,255,255) //entry at 50% fibo

    //drawsegment(startbar,itarget,barindex,itarget) coloured(255,255,255) //target at 161.8% fibo

    endif

    if close<sarslow then //bearish trend

    //drawsegment(startbar,istop,barindex,istop) coloured(250,0,0) //stoploss

    //drawsegment(startbar,entry,barindex,entry) coloured(255,255,0) //entry at 50% fibo

    //drawsegment(startbar,itarget,barindex,itarget) coloured(255,255,255) //target at 161.8% fibo

    endif

    endif


    return

    #261087 quote
    Iván González
    Moderator
    Legend

    Bonjour,

    fillcolor n’est pas une instruction autonome : c’est un complément qui se place derrière DRAWRECTANGLE. Dans ton code actuel il n’y a pas de rectangles, seulement des DRAWSEGMENT et des DRAWTEXT — voilà pourquoi tu ne trouves pas où le mettre. Il faut que tu ajoutes les rectangles toi-même.

    Le patron ProBuilder pour une boîte remplie avec transparence est :

    DRAWRECTANGLE(x1, y1, x2, y2) COLOURED(r,g,b, 0) fillcolor(r,g,b, alpha)
    
    • COLOURED(...,0) → bordure transparente (pas de cadre)
    • fillcolor(r,g,b, alpha) → remplissage ; alpha entre 0 et 255 (0 = invisible, 255 = opaque). C’est exactement la « transparence modulable » que tu cherches.

    Petit piège à éviter aussi : dans ton code d’origine, les boîtes/lignes/textes étaient dessinés à chaque bougie pendant plotbar barres → accumulation visuelle (les étiquettes “150150150150…” se superposent). Il faut dessiner une seule fois au moment du signal, en projetant l’extrémité droite avec barindex + plotbar.

    J’en profite pour fusionner tes deux indicateurs en un seul qui dessine les deux zones Fib (1.5 ↔ 1.618 et 2.5 ↔ 2.618) à chaque signal du SAR de Nicolas. Tu peux ajuster plotbar (durée des boîtes en bougies) et alphafill (transparence, 0–255) directement en haut du code :

    //PRC_Scalping SAR + Fibonacci zones 150/162 & 250/262
    //Original: Nicolas @ http://www.prorealcode.com
    //Version avec boîtes Fibonacci remplies — dessin unique par signal
    
    
    // --- Paramètres (modifiables) ---
    plotbar = 30       // durée en bougies de la zone dessinée
    alphafill = 60     // transparence du remplissage : 0 invisible, 255 opaque
    // --- ---
    
    
    sarfast = SAR[0.02, 0.02, 0.2]
    sarslow = SAR[0.005, 0.005, 0.05]
    
    
    if close < sarfast then
        ll = min(ll, low)
    else
        hh = max(hh, high)
    endif
    
    
    // Nouveau signal haussier — dessin unique
    if close > sarfast and close[1] < sarfast[1] then
        fibo0 = ll
        ll = sarslow
        if close > sarslow then
            irange = high - fibo0
            fib150 = fibo0 + irange * 1.5
            fib162 = fibo0 + irange * 1.618
            fib250 = fibo0 + irange * 2.5
            fib262 = fibo0 + irange * 2.618
            endbar = barindex + plotbar
    
    
            drawrectangle(barindex, fib150, endbar, fib162) coloured(255,255,255, 0) fillcolor(255,255,255, alphafill)
            drawrectangle(barindex, fib250, endbar, fib262) coloured(255,255,255, 0) fillcolor(255,255,255, alphafill)
    
    
            drawsegment(barindex, fib150, endbar, fib150) coloured(250,250,250) style(dottedline, 1)
            drawsegment(barindex, fib162, endbar, fib162) coloured(250,250,250) style(dottedline, 1)
            drawsegment(barindex, fib250, endbar, fib250) coloured(250,250,250) style(dottedline, 1)
            drawsegment(barindex, fib262, endbar, fib262) coloured(250,250,250) style(dottedline, 1)
    
    
            drawtext("150", endbar, fib150, dialog, standard, 10) coloured(250,250,250)
            drawtext("162", endbar, fib162, dialog, standard, 10) coloured(250,250,250)
            drawtext("250", endbar, fib250, dialog, standard, 10) coloured(250,250,250)
            drawtext("262", endbar, fib262, dialog, standard, 10) coloured(250,250,250)
        endif
    endif
    
    
    // Nouveau signal baissier — dessin unique
    if close < sarfast and close[1] > sarfast[1] then
        fibo0 = hh
        hh = 0
        if close < sarslow then
            irange = fibo0 - low
            fib150 = fibo0 - irange * 1.5
            fib162 = fibo0 - irange * 1.618
            fib250 = fibo0 - irange * 2.5
            fib262 = fibo0 - irange * 2.618
            endbar = barindex + plotbar
    
    
            drawrectangle(barindex, fib150, endbar, fib162) coloured(255,255,255, 0) fillcolor(255,255,255, alphafill)
            drawrectangle(barindex, fib250, endbar, fib262) coloured(255,255,255, 0) fillcolor(255,255,255, alphafill)
    
    
            drawsegment(barindex, fib150, endbar, fib150) coloured(250,250,250) style(dottedline, 1)
            drawsegment(barindex, fib162, endbar, fib162) coloured(250,250,250) style(dottedline, 1)
            drawsegment(barindex, fib250, endbar, fib250) coloured(250,250,250) style(dottedline, 1)
            drawsegment(barindex, fib262, endbar, fib262) coloured(250,250,250) style(dottedline, 1)
    
    
            drawtext("150", endbar, fib150, dialog, standard, 10) coloured(250,250,250)
            drawtext("162", endbar, fib162, dialog, standard, 10) coloured(250,250,250)
            drawtext("250", endbar, fib250, dialog, standard, 10) coloured(250,250,250)
            drawtext("262", endbar, fib262, dialog, standard, 10) coloured(250,250,250)
        endif
    endif
    
    
    return
    


    robertogozzi thanked this post
    #261099 quote
    Géraud Laveissiere
    Participant
    Average

    bravo Ivan.Merci bien.

    #261100 quote
    Géraud Laveissiere
    Participant
    Average

    Ivan, est il possible d afficher les boites d elliott en Multi Time Frame à savoir m1 m5 m30 sur un seul graphe?

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

ProRealTime : couleur auto des boîtes Fibonacci 150/162


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Summary

This topic contains 3 replies,
has 2 voices, and was last updated by Géraud Laveissiere
2 weeks, 1 day ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 05/14/2026
Status: Active
Attachments: No files
Logo Logo
Loading...