Daily candelstick heikin ashi

Forums ProRealTime forum Français Support ProBuilder Daily candelstick heikin ashi

Viewing 3 posts - 1 through 3 (of 3 total)
  • #247675

    Bonjour à tous,

    J’aurais besoin d’une modification de l’indicateur Daily Candelstick en heikin ashi. J’ai essayé mais mes compétences ne m’ont pas permis d’y parvenir.

    Voici le code de l’original qui faut passer en heikin ashi

    defparam drawonlastbaronly = true

    alpha = 500 //from 0 to 255 to change alpha transparency

    dop = dopen(0)
    dhi = dhigh(0)
    dlo = dlow(0)
    dcl = dclose(0)

    //candlestick color
    if dop>dcl then
    direction = -1
    else
    direction = 1
    endif

    //bullish candle
    if direction = 1 then
    //candlestick body
    DRAWRECTANGLE(barindex-5,dop,barindex,dcl) COLOURED(50,205,50,alpha)style(line,3)
    //candlestick high and low
    DRAWRECTANGLE(barindex-3,dcl,barindex-2,dhi) COLOURED(50,205,50,alpha)style(line,3)
    DRAWRECTANGLE(barindex-3,dop,barindex-2,dlo) COLOURED(50,205,50,alpha)style(line,3)
    endif

    //bearish candle
    if direction = -1 then
    //candlestick body
    DRAWRECTANGLE(barindex-5,dcl,barindex,dop) COLOURED(220,20,60,alpha)style(line,3)
    //candlestick high and low
    DRAWRECTANGLE(barindex-3,dop,barindex-2,dhi) COLOURED(220,20,60,alpha)style(line,3)
    DRAWRECTANGLE(barindex-3,dcl,barindex-2,dlo) COLOURED(220,20,60,alpha)style(line,3)
    endif

    RETURN

    #247699

    Voilà, j’ai utilisé les mêmes noms que vos variables avec un X initial pour indiquer les bougies Heikin-Ashi :

     

    1 user thanked author for this post.
    #247710

    un grand merci Roberto

    1 user thanked author for this post.
Viewing 3 posts - 1 through 3 (of 3 total)

Create your free account now and post your request to benefit from the help of the community
Register or Login