Ligne plus haut et plus bas de l'indicateur HA Smooth

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #122141 quote
    Sofitech
    Participant
    Master

    Bonjour.
    Dans le code ci-dessous, j’aimerais tracer une ligne qui suivrait le plus bas et une autre les plus haut des chandeliers Heiken Ashi Smooth créés par l’indicateur.
    Avoir un valeur à mentionner dans RETURN.
    Visiblement de n’est ni xlow, ni xxlow…
    Je voudrais savoir comment coder cela… et quel valeur mettre dans RETURN.
    Merci d’avance pour votre aide.

    //ALE - 28.06.2018
    //@PROREALCODE
    /////////
    //HeikinPeriod =40
    //AverageType  =5
    //ChannelPeriod=10
    //TransParency =15
    /////////
    atr=averagetruerange
    IF BarIndex=0 THEN
    xClose = (open+high+low+close)/4
    xOpen = open
    xHigh = high
    xLow = low
    ELSE
    xClose = (open+high+low+close)/4
    xOpen = (xOpen[1]+xClose[1])/2
    xHigh = Max(max(high, xOpen), xClose)
    xLow = Min(min(Low, xOpen), xClose)
    endif
    //Smoothed Heikin-Ashi
    xxclose=Average[max (1,HeikinPeriod),AverageType](xclose)
    xxOpen = Average[max (1,HeikinPeriod),AverageType](xOpen)
    xxHigh = Average[max (1,HeikinPeriod),AverageType](xHigh)
    xxLow  = Average[max (1,HeikinPeriod),AverageType](xLow)
    
    
    //Colour Setting
    MyDi = xxclose-xxclose[1]
    r=50+(200-MyDi*100)
    g=50+(200+MyDi*100)
    b=50+(0+MyDi*30)
    //Build channel with Highest and Lowest of Heikin-Ashi smoothed candle
    DRAWCANDLE(xxOpen, highest[max(1, ChannelPeriod)](xxHigh), lowest[max(1, ChannelPeriod)](xxlow), xxClose) Coloured (R,G,b,MAX(50,Transparency*10))
    
    
    Return
    #122224 quote
    Nicolas
    Keymaster
    Master

    Plus haut et plus bas de l’indicateur depuis le début de l’historique ?

    #122273 quote
    Sofitech
    Participant
    Master

    Je crois avoir trouvé une manière de coder ce que je souhaite, j’ai simplement ajouté :


    Bas=lowest[max(1, ChannelPeriod)](xxlow)
    Haut=highest[max(1, ChannelPeriod)](xxHigh)

    et placé Bas et Haut dans le Return….

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

Ligne plus haut et plus bas de l'indicateur HA Smooth


ProBuilder : Indicateurs & Outils Personnalisés

New Reply
Author
author-avatar
Sofitech @sofitech Participant
Summary

This topic contains 2 replies,
has 2 voices, and was last updated by Sofitech
5 years, 11 months ago.

Topic Details
Forum: ProBuilder : Indicateurs & Outils Personnalisés
Language: French
Started: 03/14/2020
Status: Active
Attachments: No files
Logo Logo
Loading...