Afficher nombre de points entre points hauts et points bas

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #209076 quote
    r0d0lphe
    Participant
    Average

    Bonjour,

     

    Je recherche à afficher sur le graphique le nombre de points entre les plus hauts et les plus bas comme sur l’image jointe. J’ai cherché sur les forums (peut être mal) mais rien trouvé qui ressemble

     

    J’ai bien essayé d’adapter ce code de Nicolas mais je n’arrive pas à remplacer les texte HH, LH, HL et HH par l’ecart de points.

     

    percent = 0.5
     
    zzh = ZigZag[percent](high)
    zzl = zigzag[percent](low)
     
    top = zzh<zzh[1] and zzh[1]>zzh[2]
    bot = zzl>zzl[1] and zzl[1]<zzl[2]
     
    once lastzz=1
    atr = averagetruerange[10]
     
    //peaks
    if top then 
     
     
    //segment
    if lastzz<0 then 
    drawsegment(barindex[1],zzh[1],prevlbar,prevl)
     
    //LH
    if zzh[1]<prevh then 
    drawtext("LH",barindex[1],zzh[1]+atr/2,dialog,bold,16)
    else
    //HH
    drawtext("HH",barindex[1],zzh[1]+atr/2,dialog,bold,16)
    endif
    else
    drawsegment(barindex[1],zzh[1],prevhbar,prevh)
    endif
    lastzz=1
    prevhbar=barindex[1]
    prevh=zzh[1]
    endif
     
    //troughs
    if bot then
     
     
    //segment
    if lastzz>0 then 
    drawsegment(barindex[1],zzl[1],prevhbar,prevh)
     
    //HL
    if zzl[1]>prevl then
    drawtext("HL",barindex[1],zzl[1]-atr/2,dialog,bold,16)
    else
    //LL
    drawtext("LL",barindex[1],zzl[1]-atr/2,dialog,bold,16)
    endif
    else
    drawsegment(barindex[1],zzl[1],prevlbar,prevl)
    endif
    lastzz=-1
    prevlbar=barindex[1]
    prevl=zzl[1]
    endif
     
    return

     

     

    Merci d’avance pour votre aide

    Capture-decran-2023-02-03-222509.png Capture-decran-2023-02-03-222509.png
    #209095 quote
    fifi743
    Participant
    Master

    la variable est la différence entre le haut et le bas

    Dif=high-low

    et pour l’affichage
    drawtext(“#dif#”,barindex)
    pas testé mais en principe c’est CA

    #209142 quote
    r0d0lphe
    Participant
    Average

    Merci pour ta réponse fifi

    J’avais déjà essayé high-low mais malheureusement ça ne donne pas les bonnes valeurs.

    Pas plus que zzh-zzl

    PS : je me suis trompé de section… Je voulais poster sur Support ProOrder

    #209143 quote
    JC_Bywan
    Moderator
    Master

    Bjr,

    effectivement le sujet ayant été posté dans le forum proscreener, je vais le déplacer, mais pour le transférer dans le forum probuider (indicateurs à afficher à l’écran, codes finissant par ligne “return”), pas proorder (stratégies et backtests), merci pour le PS, on était passé à côté

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

Afficher nombre de points entre points hauts et points bas


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
r0d0lphe @r0d0lphe Participant
Summary

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

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 02/03/2023
Status: Active
Attachments: 1 files
Logo Logo
Loading...