affihcer seulement sur période choisi

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #237350 quote
    teshmi9zteshmi9z
    Participant
    New

    bonjour, j’ai fait ce code qui met un background si le prix approche les de 0,5% du niveau de 61,8 de fibo des 80 bougies precedente, sauf que je n’arrive pas a mettre le background UNIQUIEMENT a partir du hh ou ll detecter , j’ai tous essayé ( boucle, condititon du barindex : barindex> barindex[hh or ll))
    si vous avez un solution je suis preneur, merci

    le code si dessous ne fonctionne pas évidenement,  celui de l’image joint fonctionne par contre

    defparam DRAWONLASTBARONLY = true
    defparam calculateonlastbars=80
    
    
    hh = highest[80](high)
    ll = lowest[80](low)
    
    
    fib618 = (hh-ll)*0.618
    
    level618 = ll+fib618
    
    if level618 then 
    DRAWLINE(barindex, level618 , barindex[5], level618 )
    drawtext("          62%",barindex,level618 ,Dialog,Standard,10) coloured(0,0,200)
    ENDIF 
    
    nb= BarIndex>barindex[hh] 
    nearpercent =  (1-(close/level618))*100
    
    if nearpercent<0.5 and nb then
     BACKGROUNDCOLOR (240, 253, 215)
    endif
    
    RETURN
    Capture-decran-2024-09-09-112327.png Capture-decran-2024-09-09-112327.png
    #237404 quote
    fifi743fifi743
    Participant
    Master

    et avec COLORBETWEEN

    #237414 quote
    Iván GonzálezIván González
    Moderator
    Legend

    Vous pouvez faire un rectangle

    defparam DRAWONLASTBARONLY = true
    
    hh = highest[80](high)
    ll = lowest[80](low)
    
    fib618 = (hh-ll)*0.618
    
    level618 = ll+fib618
    
    if level618 then
    DRAWLINE(barindex, level618 , barindex[5], level618 )
    drawtext("          62%",barindex,level618 ,Dialog,Standard,10) coloured(0,0,200)
    ENDIF
    
    bar=barssince(level618 <> level618[1])
    
    nearpercent =  (1-(close/level618))*100
    
    if islastbarupdate then
    if nearpercent<0.5 then
    //BACKGROUNDCOLOR (240, 253, 215)
    drawrectangle(barindex,hh,barindex[bar],ll)fillcolor(240, 253, 215,100)
    endif
    endif
    RETURN hh as "Highest"coloured("red"),ll as "Lowest"coloured("green"), level618 coloured("blue")
    #237479 quote
    teshmi9zteshmi9z
    Participant
    New

    merci pour votre aide, j’ai reussi a faire ce que je voulais avec la fonction bar

    defparam DRAWONLASTBARONLY = true
    defparam calculateonlastbars=80
    
    
    hh = highest[80](high)
    ll = lowest[80](low)
    
    
    fib618 = (hh-ll)*0.618
    
    level618 = ll+fib618
    
    if level618 then
    DRAWLINE(barindex, level618 , barindex[5], level618 )
    drawtext("          62%",barindex,level618 ,Dialog,Standard,10) coloured(0,0,200)
    ENDIF
    
    bar=barssince(level618 <> level618[1])
    
    nearpercent =  (1-(close/level618))*100
    
    if nearpercent<0.2 and bar then
    BACKGROUNDCOLOR (240, 253, 215)
    //COLORBETWEEN(level618,close,"RED") 
    endif
    
    RETURN
    

     

    since

    Capture-decran-2024-09-11-103800.png Capture-decran-2024-09-11-103800.png Capture-decran-2024-09-11-103858.png Capture-decran-2024-09-11-103858.png
Viewing 4 posts - 1 through 4 (of 4 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

affihcer seulement sur période choisi


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
teshmi9z @teshmi9z Participant
Summary

This topic contains 3 replies,
has 3 voices, and was last updated by teshmi9zteshmi9z
2 years ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 09/09/2024
Status: Active
Attachments: 3 files
ProRealCode ProRealCode
Loading...