Création boite Asie et projections fibo

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #184364 quote
    Lifen
    Participant
    Senior

    [attachment file=”184365″]

    Bonjour,

    Tout d’abord, je vous souhaite une bonne et heureuse année 2022 !

    Je me permets de vous solliciter car j’aurais besoin d’aide pour créer un indicateur qui se renouvellerait tous les jours et dont les principes sont :

    • Création de la boite Asie en partant des horaires 00h00/08h00
    • Identification par une ligne horizontale de la médiane de cette boite Asie
    • Projection des niveaux de Fibonacci en partant de la médiane de la boite jusqu’au haut de la boite pour l’écart type qui sera à projeter avec les fibo à partir du haut de cette boite
    • Projection des niveaux de Fibonacci en partant de la médiane de la boite jusqu’au bas de la boite pour l’écart type qui sera à projeter avec les fibo à partir du bas de cette boite

     

    Vous remerciant par avance de votre attention et aide.

    Bien à vous

    Capture-decran-213.png Capture-decran-213.png
    #184683 quote
    JC_Bywan
    Moderator
    Master

    Bonne année à toi aussi, à tester (ou que tu peux modifier facilement si par exemple tu ne veux pas le texte, ou le placer ailleurs, ou ajouter ou enlever des niveaux, etc…)

    if opentime[1]>opentime then
    startboxbar=barindex
    ll=low
    hh=high
    endif
    if opentime<080000 then
    ll=min(ll,low)
    hh=max(hh,high)
    endif
    if opentime[1]<080000 and opentime>=080000 then
    med=(ll+hh)/2
    delta=hh-med
    h16=opendate*1000000+160000
    h24=opendate*1000000+235900
    custombar=(barindex+startboxbar)/2
    textbar=(startboxbar+custombar)/2
    DRAWRECTANGLE(startboxbar, ll, barindex, hh)
    DRAWSEGMENT(startboxbar, med, datetobarindex(h24), med)
    
    DRAWRECTANGLE(barindex, hh, datetobarindex(h16), hh+2*delta)
    DRAWSEGMENT(custombar, hh+delta, datetobarindex(h24), hh+delta)
    
    DRAWSEGMENT(custombar, hh+0.236*delta, datetobarindex(h24), hh+0.236*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+0.382*delta, datetobarindex(h24), hh+0.382*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+0.618*delta, datetobarindex(h24), hh+0.618*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+1.236*delta, datetobarindex(h24), hh+1.236*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+1.382*delta, datetobarindex(h24), hh+1.382*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+1.618*delta, datetobarindex(h24), hh+1.618*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+2*delta, datetobarindex(h24), hh+2*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+2.618*delta, datetobarindex(h24), hh+2.618*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+4*delta, datetobarindex(h24), hh+4*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, hh+4.236*delta, datetobarindex(h24), hh+4.236*delta) style(dottedline,1)
    
    DRAWTEXT("23.6%", textbar, hh+0.236*delta)
    DRAWTEXT("38.2%", textbar, hh+0.382*delta)
    DRAWTEXT("61.8%", textbar, hh+0.618*delta)
    DRAWTEXT("100%", textbar, hh+delta)
    DRAWTEXT("123.6%", textbar, hh+1.236*delta)
    DRAWTEXT("138.2%", textbar, hh+1.382*delta)
    DRAWTEXT("161.8%", textbar, hh+1.618*delta)
    DRAWTEXT("200%", textbar, hh+2*delta)
    DRAWTEXT("261.8%", textbar, hh+2.618*delta)
    DRAWTEXT("400%", textbar, hh+4*delta)
    DRAWTEXT("423.6%", textbar, hh+4.236*delta)
    
    DRAWRECTANGLE(barindex, ll, datetobarindex(h16), ll-2*delta)
    DRAWSEGMENT(custombar, ll-delta, datetobarindex(h24), ll-delta)
    
    DRAWSEGMENT(custombar, ll-0.236*delta, datetobarindex(h24), ll-0.236*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-0.382*delta, datetobarindex(h24), ll-0.382*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-0.618*delta, datetobarindex(h24), ll-0.618*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-1.236*delta, datetobarindex(h24), ll-1.236*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-1.382*delta, datetobarindex(h24), ll-1.382*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-1.618*delta, datetobarindex(h24), ll-1.618*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-2*delta, datetobarindex(h24), ll-2*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-2.618*delta, datetobarindex(h24), ll-2.618*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-4*delta, datetobarindex(h24), ll-4*delta) style(dottedline,1)
    DRAWSEGMENT(custombar, ll-4.236*delta, datetobarindex(h24), ll-4.236*delta) style(dottedline,1)
    
    DRAWTEXT("23.6%", textbar, ll-0.236*delta)
    DRAWTEXT("38.2%", textbar, ll-0.382*delta)
    DRAWTEXT("61.8%", textbar, ll-0.618*delta)
    DRAWTEXT("100%", textbar, ll-delta)
    DRAWTEXT("123.6%", textbar, ll-1.236*delta)
    DRAWTEXT("138.2%", textbar, ll-1.382*delta)
    DRAWTEXT("161.8%", textbar, ll-1.618*delta)
    DRAWTEXT("200%", textbar, ll-2*delta)
    DRAWTEXT("261.8%", textbar, ll-2.618*delta)
    DRAWTEXT("400%", textbar, ll-4*delta)
    DRAWTEXT("423.6%", textbar, ll-4.236*delta)
    
    DRAWRECTANGLE(datetobarindex(h16), hh+2*delta, datetobarindex(h24), hh+4*delta)
    DRAWRECTANGLE(datetobarindex(h16), ll-2*delta, datetobarindex(h24), ll-4*delta)
    endif
    
    return
    Lifen thanked this post
    #184947 quote
    Lifen
    Participant
    Senior

    Bonjour, merci pour ton aide, j’ai essayé d’implanter le code mais cela ne fonctionne pas. J’ai un message d’erreur, Ligne 18, caractère 34 : Merci de compléter la syntaxe de cette ligne. Je présume qu’il s’agit de la date à indiquer ? mais si je mets 0701, cela ne fonctionne pas mieux. Merci de regarder pour voir si c’est possible de remédier à ce bug. Bon dimanche

    #184949 quote
    fifi743
    Participant
    Master

    surement un problème de copier coller

    JC_Bywan and Lifen thanked this post
    Mon-indicateur6.itf
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.

Création boite Asie et projections fibo


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Lifen @lifen Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 01/02/2022
Status: Active
Attachments: 2 files
Logo Logo
Loading...