Enregistrement plus haut et plus bas

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #129423 quote
    ODuvoux
    Participant
    Junior

    Bonjour,

    Je suis actuellement en plein visionnage de la formation programmation avancé et je bloque.

    J’aimerai pouvoir garder sur le graphite l’ancien plus haut où plus bas une fois qu’il en aura trouver un nouveau et ceux tant que le prix ne vient pas le casser.

    Est-ce possible et si oui comment?

    Merci d’avance!

     

    defparam drawonlastbaronly = true
    
    // --- settings
    period = 200 //lookback period of the Fibonacci Retracement
    
    // --- end of settings
    
    hh=0
    ll=low
    shiftlowest=barindex
    for i = period downto 1 do
    if high[i]>hh then
    hh=high[i]
    shifthighest=barindex[i]
    endif
    if low[i]<ll then
    ll=low[i]
    shiftlowest=barindex[i]
    endif
    next
    
    isSwingDown = shiftHighest < shiftLowest
    
    if isSwingDown then
    fullrange = abs(hh-ll)
    rr1 = hh
    ss1 = ll
    startbar = min(shifthighest,shiftlowest)
    
    else
    fullrange = abs(hh-ll)
    ss1 = ll
    rr1 = hh
    startbar = min(shifthighest,shiftlowest)
    
    endif
    
    
    
    if startbar>0 then
    //plot fibonacci levels
    drawsegment(shiftlowest,ss1,barindex,ss1) coloured(0,0,255)
    drawtext("                                                                  Support = #ss1#",barindex-0,ss1+0*pipsize,Dialog,Standard,10) coloured(0,0,255)
    drawsegment(shifthighest,rr1,barindex,rr1) coloured(255,0,0)
    drawtext("                                                                  Résistance = #rr1#",barindex,rr1+0*pipsize,Dialog,Standard,10) coloured(255,0,0)
    
    //plot price at 0% and 100% levels
    drawtext("F= = #ll#",shiftlowest,ll-fullrange*0.04,dialog,standard,10) coloured(0,0,255)
    drawtext("F = #hh#",shifthighest,hh+fullrange*0.04,dialog,standard,10) coloured(255,0,0)
    endif
    
    
    return
    
    #129715 quote
    Nicolas
    Keymaster
    Master

    Pourrais-tu me dessiner un exemple sur le graphique, car j’ai un peu de mal à comprendre avec le code que tu as fourni. En effet, je vois un plus haut et un plus bas qui ne comporte jamais (sauf erreur de ma part) de cassure puisque par définition ils sont les plus haut et bas.

    #130013 quote
    ODuvoux
    Participant
    Junior

    Bonjour,

    J’aimerai une fois qu’il trouve un nouveau plus bas plus haut que l’ancien plus bas précédent qu’il enregistre cet ancien plus bas et inversement avec les plus haut…

    J’ai joint un fichier pour être plus clair…et en espérant l’être!

    Cordialement

    Olivier

    Fibo_PRT.jpg Fibo_PRT.jpg
    #130026 quote
    Nicolas
    Keymaster
    Master

    Combien d’anciens niveaux faut-il garder et tracer en mémoire ?

    #130031 quote
    ODuvoux
    Participant
    Junior

    Le maximum si c’est possible…?

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

Enregistrement plus haut et plus bas


ProOrder : Trading Automatique & Backtests

New Reply
Author
author-avatar
ODuvoux @oduvoux Participant
Summary

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

Topic Details
Forum: ProOrder : Trading Automatique & Backtests
Language: French
Started: 05/02/2020
Status: Active
Attachments: 1 files
Logo Logo
Loading...