Rectangle sur Graph

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #44267 quote
    jhonhamyjhonhamy
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    jhonhamyjhonhamy
    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
    NicolasNicolas
    Keymaster
    Legend

    et donc ça fonctionne désormais ?

    #44306 quote
    jhonhamyjhonhamy
    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
    jhonhamyjhonhamy
    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
    NicolasNicolas
    Keymaster
    Legend

    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
    jhonhamyjhonhamy
    Participant
    Average

    Merci nicolas

Viewing 8 posts - 1 through 8 (of 8 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

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 jhonhamyjhonhamy
9 years ago.

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