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