TURTLE SOUP HAUSSIER BAISSIER

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #205915 quote
    Roland57800
    Participant
    Veteran

    Bonsoir,

    j ai un code pour détecter les TURTLE SOUP haussier et baissier

    et je cherche pour des raisons de présentation sur le graphique de ne garder que le dernier rectangle signal

    merci pour le retour

     

    //  -- HAUSSIER --
    ll = lowest[20](low)
    if ll[1] <> ll[2] then
    barl = barindex
    ENDIF
    
    haussier=low<ll[1] and close>ll[1] and barindex-barl>=3
    
    if haussier and Ctime THEN
    DRAWARROWUP (barindex,low -15) coloured(0,100,255)
    DRAWTEXT("TS",barindex,low-17,SansSerif,BOLD,12)coloured(0,100,255)
    
    ENDIF
    
    
    
    
    //  -- BAISSIER --
    hh = highest[20](high)
    if hh[1]<>hh[2] then
    barh=barindex
    ENDIF
      
    baissier=high>hh[1] and close<hh[1] and barindex-barh>=3
    
    if baissier and Ctime THEN
    DRAWARROWDOWN(barindex,high + 5) coloured(255,0,0)
    DRAWTEXT("TS",barindex,high + 10 * pointsize,SansSerif,BOLD,12)coloured(255,0,0)
    ENDIF
    
    
    RETURN

     

    y aurait-il une formule de calcul pour effectuer cette opération

    #205916 quote
    Roland57800
    Participant
    Veteran

    Merci beaucoup

    Cordialement

    #205918 quote
    Roland57800
    Participant
    Veteran

    j’ai copié le mauvais code

    je le renvoie

    désolé

    #205919 quote
    Roland57800
    Participant
    Veteran

    Voici le code pour lequel je souhaiterais ne garder que le dernier signal

    pour alléger la présentation des graphiques

    Merci pour votre retour

    Cordialement

    // TURTLE SOUP BAISSIER
    
    if intradaybarindex = 0 then
    hh = 0
    ll = 0
    ENDIF
    
    startbar = barindex[20]
    endbar = barindex[0]
    
    hh=highest[20] (high)
    ll=lowest[20](low)
    if hh[1]<>hh[2] then
    barh=barindex
    ENDIF
    
    baissier=high>hh[1] and close<hh[1] and barindex-barh>=3
    
    if BAISSIER  then
    DRAWRECTANGLE(Startbar,hh,endbar,ll) coloured(255,10,10)
    DRAWARROWDOWN(barindex,high + 5) coloured(255,0,0)
    DRAWTEXT("TS",barindex,high + 10 * pointsize,SansSerif,BOLD,12)coloured(255,0,0)
    ENDIF
    
    // TURTLR SOUP HAUSSIER
    
    if intradaybarindex = 0 then
    hh = 0
    ll = 0
    ENDIF
    
    startbar = barindex[20]
    endbar = barindex[0]
    
    
    hh=highest[20] (high)
    ll=lowest[20](low)
    if ll[1]<>ll[2] then
    barl=barindex
    ENDIF
    
    haussier=low<ll[1] and close>ll[1] and barindex-barl>=3
    
    if HAUSSIER  then
    DRAWRECTANGLE(Startbar,hh,endbar,ll)coloured(0,10,255)
    DRAWARROWUP (barindex,low -15) coloured(0,100,255)
    DRAWTEXT("TS",barindex,low-17,SansSerif,BOLD,12)coloured(0,100,255)
    ENDIF
    
    RETURN
    #209210 quote
    RoboCode
    Participant
    New

    Bonjour Roland

    Réponse tardive car je viens de tomber sur votre poste et j’ai testé votre code.

    Merci pour le partage, votre code me permet de me familiariser avec Probuilder et c’est pas simple quand on débute.

    Pour répondre à votre question, je n’ai pas cherché la solution, donc je ne sais pas s’il y en a une, mais finalement, quel est l’intérêt de tracer ces rectangles vu que vos signaux sont déjà matérialisés par des flèches et du texte.

    Supprimer ces rectangles rendrait finalement les graphiques moins chargés.

    TradingMent

    BR38

    #209239 quote
    Nicolas
    Keymaster
    Master

    Puisqu’on ne peut pas effacer les objets déjà tracés, il faudrait enregistrer les coordonnées dans des variables et tracer uniquement les objets depuis la dernière bougie (donc en arrière) de l’historique, et pas à sa lecture.

    On peut utiliser ces instructions pour cela:

    defparam drawonlastbaronly=true //on ne trace que sur le (ou à partir du) dernier chandelier (à placer en tête de code)

    avec

    if islastbarupdate then //dés que le prix change sur le dernier chandelier (celui courant) 
     // je trace 
    endif 
    
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

TURTLE SOUP HAUSSIER BAISSIER


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
Summary

This topic contains 5 replies,
has 3 voices, and was last updated by Nicolas
3 years, 1 month ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 12/16/2022
Status: Active
Attachments: No files
Logo Logo
Loading...