Drawrectangle marché US

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #261422 quote
    larouedegann
    Participant
    Master

    Bonjour,

    voici ci dessous un code trouvé dans la bibliothèque, malheureusement quand la première barre se trouve être un plus bas ou plus haut,

    le rectangle n’en tient pas compte et prend la cloture de la barre.

    if time<=153000 then
    plotted=0
    endif
    IF time >= 153000 and plotted=0  THEN
    plotted=1
    hh = highest[89](high)
    ll = lowest[89](low)
    mm = (hh+ll)/2
    DRAWRECTANGLE(barindex,hh,barindex[89],ll)coloured ("Darkviolet",100)bordercolor("black")
    
    
    DRAWSEGMENT(barindex,hh,barindex+30,hh) coloured (0,0,0)STYLE(line,3)
    DRAWSEGMENT(barindex,ll,barindex+30,ll) coloured (0,0,0)STYLE(line,3)
    DRAWSEGMENT(barindex,mm,barindex+30,mm) coloured ("cyan")STYLE(line,3)
    
    
    DRAWTEXT("Haut US",barindex+25,hh+(pipsize) ,SansSerif,Bold,10)coloured(0,0,0)
    DRAWTEXT("Bas US",barindex+25,ll+(pipsize),SansSerif,Bold,10)coloured(0,0,0)
    DRAWTEXT("Middle US",barindex+25,mm+(pipsize),SansSerif,Bold,10)coloured(0,0,0)
    ENDIF
    RETURN
    
    
    
    Capture-decran-2026-05-20-210421.png Capture-decran-2026-05-20-210421.png
    #261435 quote
    Nicolas
    Keymaster
    Legend

    Selon le code, le rectangle se dessine en bas à gauche avec la coordonnée prix du plus bas rencontré durant les 89 bougies le moment où on trace le rectangle. La coordonnée en temps elle (barindex), ne correspond pas forcément au plus bas de la période. Tu peux le remarquer avec le plus haut, le rectangle quoiqu’il arrive fait toujours 89 périodes, donc le plus haut et le plus bas ne coïncideront pas forcément avec le chandelier 0 et le chandelier 89. J’espère avoir été clair 😉

    Iván González thanked this post
    #261436 quote
    turame
    Participant
    Master

    Salut,

    Tu es en unité de temps 1 min donc en ligne 6 et 7 il faut que tu remplaces les valeurs 89 par 90. Ca marchera.


    Iván González thanked this post
    #261437 quote
    turame
    Participant
    Master

    @Nicolas plus rapide que moi 😉

    Nicolas thanked this post
    #261464 quote
    larouedegann
    Participant
    Master

    merci turame effectivement

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

Drawrectangle marché US


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 4 replies,
has 3 voices, and was last updated by larouedegann
1 week, 1 day ago.

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