Fonction Draw et Time

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #52574 quote
    Ted21
    Participant
    Senior

    Bonjour,

    Sur un graphique Forex en 15 Mn, je souhaiterais utiliser les fonctions Draw, par exemple avec la fonction Drawarrowup placer des flèches à 9h00 et à 14h00.

    Et que ces flèches soient placées sur le graphe principale à une certaine distance des cours pour plus de lisibilité.

    Je ne m’en sors pas avec la fonction Time.

    Par avance merci,

    #52575 quote
    Nicolas
    Keymaster
    Master

    L’instruction Time renvoi l’heure de fermeture de la bougie, et OpenTime son heure d’ouverture, donc je ne sais pas sur quelle bougie tu souhaites placer des flèches, mais peu importe, voici le code avec Time:

    atr = averagetruerange[14]
    
    if Time=140000 or Time=090000 then 
     drawarrowup(barindex,close-atr/2)
    endif
    
    return

    Pour placer les flèches à “une certaine distance des cours”, j’utilise un demi ATR en dessous du Close de la bougie courante.

    Ted21 thanked this post
    #52583 quote
    Ted21
    Participant
    Senior

    Merci beaucoup, c’est exactement ce que je cherchais.

    #129229 quote
    GilInvest
    Participant
    Average

    Bonjour, dans ce code pour afficher des outside bar sur mon graphique, j’ai un souci : que ce soit une OB baissière ou haussiere, le code affiche systématiquement 2 fleches à chaque fois, une au dessus et une en dessous de l’OB alors qu’il faudrait une seule fleche, celle dans le sens de la direction supposée que prendra le prix apres l’OB (fleche montant sous l’OB en cas d’OB haussiere et vice et versa). Pouvez vous m’aider ? merci

    atr10=averagetruerange[10]
    
    If high>high[1] and low<low[1] and high[1]-low[1]>atr10/2 then
    
    if close>high[1] and close-open>(atr10/2) then
    
    DRAWARROWUP(barindex[0],low-atr10/3)coloured(0,200,0)
    
    DRAWARROWdown(barindex[0],high+atr10/3)coloured(0,200,0)
    
    endif
    
    if close<low[1] and open-close>(atr10/2) then
    
    DRAWARROWdown(barindex[0],high+atr10/3)coloured(200,0,0)
    
    DRAWARROWup(barindex[0],low-atr10/3)coloured(200,0,0)
    
    endif
    
    endif
    
    return
    #129299 quote
    larouedegann
    Participant
    Master

    Bonjour,

    Pour chaque condition c’est soit l’une soit l’autre,sinon tu te retrouves avec une flàeche en haut et une en bas.

    atr10=averagetruerange[10]
     
    If high>high[1] and low<low[1] and high[1]-low[1]>atr10/2 then
     
    if close>high[1] and close-open>(atr10/2) then
     
    DRAWARROWUP(barindex[0],low-atr10/3)coloured(0,200,0)
     
    
     
    endif
     
    if close<low[1] and open-close>(atr10/2) then
     
    DRAWARROWdown(barindex[0],high+atr10/3)coloured(200,0,0)
     
    
     
    endif
     
    endif
     
    return
    
    GilInvest thanked this post
    #129902 quote
    GilInvest
    Participant
    Average

    Bjr, j’ai un souci avec mon code : sur certains sous jacents il fait apparaitre la fleche indiquant l’OB sur la bonne bougie (Ex : PXI) et d’autres (Ex : DAX) ca la fait apparaitre sur la bougie B-1. Voir snapshot. Je crois que ca me fait la meme chose en mensuel mais pas sur les

    atr10=averagetruerange[10]
    
    If high>high[1] and low<low[1] and high[1]-low[1]>atr10/2 then
    
    if close>high[1] and close-open>(atr10/2) then
    
    DRAWARROWUP(barindex[0],low-atr10/3)coloured(0,200,0)
    
    endif
    
    if close<low[1] and open-close>(atr10/2) then
    
    DRAWARROWdown(barindex[0],high+atr10/3)coloured(200,0,0)
    
    endif
    
    endif
    
    return

     

    autres UT courantes. Avez vous une idée pour la résolution du bug ? Est ce la fonction Time qui est mal codée ? Merci

    200504-Bug-Daily-OB-Dax-PXI.jpg 200504-Bug-Daily-OB-Dax-PXI.jpg
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

Fonction Draw et Time


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Ted21 @ted21 Participant
Summary

This topic contains 5 replies,
has 4 voices, and was last updated by GilInvest
5 years, 10 months ago.

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