indicateur ligne Chikou

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #192117 quote
    PRC_2021
    Participant
    Average

    Bonjour,

    je souhaiterais avoir la Chikou en ligne continue et non en sympbole comme dans mon code. J’ai essayé avec “drawligne” mais sans succes.

    drawtext("X",barindex,close) coloured(255,0,0)
    
    return

    Pouvez vous m’aider svp ?

    Merci par avance.

    #192124 quote
    Nicolas
    Keymaster
    Master

    Une ligne horizontale se code avec l’instruction DRAWHLINE : https://www.prorealcode.com/documentation/drawhline/

    #192142 quote
    PRC_2021
    Participant
    Average

    Oui, mais quelque chose doit me manquer car cela me fait des trait horizontaux à chaque clôture

    x = Close[0]
    //drawtext("X",barindex,close) coloured(255,0,0)
    
    DRAWHLINE(x)coloured(255,0,0)style(line,1)
    
    return
    
    #192147 quote
    robertogozzi
    Moderator
    Master

    Ajoutez cette ligne au début:

    DEFPARAM DrawOnLastBarOnly = True
    #192149 quote
    PRC_2021
    Participant
    Average

    Je suis retombé sur ce post qui m’indique comment faire si ça peut aider d’autres.

    Un peux compliqué pour un simple close projeté 26 périodes en arrière 🙂

    period = 1
    decay  = 26
     
    inner  = 2*weightedaverage[round(period/2)](close)-weightedaverage[period](close)
    chikou = weightedaverage[round(sqrt(period))](inner)
     
    DrawSegment(barindex[decay],chikou,barindex[decay+1],chikou[1]) coloured(2,22,222)
     
    return chikou coloured(0,0,0,0)
    #192170 quote
    Nicolas
    Keymaster
    Master

    Je pense que tu as mal interprété le code que tu as trouvé. Pour tracer le Close actuel dans le passé, on trace un segment de “decay” bars en arrière avec le Close:

    decay  = 26
    chikou = close
     
    DrawSegment(barindex[decay],chikou,barindex[decay+1],chikou[1]) coloured(2,22,222)
     
    return chikou coloured(0,0,0,0)
Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.

indicateur ligne Chikou


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
PRC_2021 @manu35250 Participant
Summary

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

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