Rectangle sur Graph

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #44267 quote
    jhonhamy
    Participant
    Average

    Bonjour à tous,

    J’ai suivi l’indication de cette adresse ICI

    Le souci des ce rectangles sur les graphiques, il commence tout début des graph est non à des heures précisé comme exemple de 02HOO a 09H00 pour chaque jours.

    starttime = 020000
    endtime = 090000
    
    if intradaybarindex=0 then
     hh = 0
     ll = 0
     alreadydrawn = 0
    endif
    
    if time=starttime then
     startbar=barindex
    endif
    
    if time=endtime then
     endbar=barindex
    endif
    
    if time>=starttime and time<=endtime then
     if high>hh then
      hh = high
     endif
     if low<ll or ll=0 then
      ll = low
     endif
    endif
    
    if time>endtime and alreadydrawn=0 then
     drawrectangle(startbar,hh,endbar,ll)
     alreadydrawn=1
    endif
    
    RETURN

    Amicalement Jhon

    Capture-d’écran-2017-08-21-à-09.25.54.png Capture-d’écran-2017-08-21-à-09.25.54.png
    #44276 quote
    Nicolas
    Keymaster
    Master

    Quel est le timeframe de ton exemple ? L’image étant tronquée je n’arrive pas à bien voir 🙂 et l’instrument en question ? es-tu certain qu’il cote à 2h00 du matin ?

    #44281 quote
    jhonhamy
    Participant
    Average

    Bonjour Nicolas,

    starttime = 080000
    endtime = 090000

    Je viens d’apercevoir une erreur de ma part je pense, c’etait la plage horaire régler de 21H a 08H dans option de plateforme sa ne marché pas.

    Bizarre car je pense qua sa aurait fonctionner normalement.

     

    Amicalement

    #44283 quote
    Nicolas
    Keymaster
    Master

    et donc ça fonctionne désormais ?

    #44306 quote
    jhonhamy
    Participant
    Average

    Oui  le code fonctionne bien merci,

    Es normal que si je règle une plage horaire ( dans option de plateforme) exemple 22h a 08h,

    les rectangles disparait, et revienne depuis le début du graphique est non à ‘horaire startime comme prédéfinie dans le code ?

     

    Amicalement

    #44309 quote
    jhonhamy
    Participant
    Average

    J’ai rajouter une couleur autour du rectangle jusque la OK.

    Mais je n’arrive pas a ajouter une couleur interne (remplissage d’une couleur dans le rectangle)

    starttime = 080000
    endtime = 090000
    
    if intradaybarindex=0 then
    hh = 0
    ll = 0
    alreadydrawn = 0
    endif
    
    if time=starttime then
    startbar=barindex
    endif
    
    if time=endtime then
    endbar=barindex
    endif
    
    if time>=starttime and time<=endtime then
    if high>hh then
    hh = high
    endif
    if low<ll or ll=0 then
    ll = low
    endif
    endif
    
    if time>endtime and alreadydrawn=0 then
    drawrectangle(startbar,hh,endbar,ll)coloured(10,255,10,255)
    alreadydrawn=1
    endif
    
    RETURN

    Amicalement

    #44333 quote
    Nicolas
    Keymaster
    Master

    Il faut bien entendu que l’heure du code soit visible sur le graphique, sinon la condition horaire ne sera jamais vérifiée et rien ne s’affichera 🙂

    Concernant le remplissage des rectangles, ça n’est pas possible, on ne peut colorier que le cadre comme tu l’as très bien fait, bravo.

    #44519 quote
    jhonhamy
    Participant
    Average

    Merci nicolas

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

Rectangle sur Graph


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
jhonhamy @jhonhamy Participant
Summary

This topic contains 7 replies,
has 2 voices, and was last updated by jhonhamy
8 years, 6 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 08/21/2017
Status: Active
Attachments: 1 files
Logo Logo
Loading...