the principle is very simple: the candles are in Heikin Ashi, but they change color only when they cross the rsi 50 line, understood as the zone where the balance of power between buyers and sellers is reversed.
The default rsi setting is 14, but this can be changed.
The candle color change occurs slightly later than the Heikin Ashi… but that adds a few straps to the belt.
Have fun!
myRSI = rsi[period](close)
ONCE OuvertureHA = (open + close + high + low)/4
ONCE ClotureHA = (open + close)/2
ONCE PlusBasHA = high
ONCE PlusHautHA = low
OuvertureHA = (OuvertureHA + ClotureHA)/2
ClotureHA = (open + close + high + low)/4
PlusBasHA = MIN(MIN(OuvertureHA,ClotureHA),low)
PlusHautHA = MAX(MAX(OuvertureHA,ClotureHA),high)
if myRSI > 50 then
DRAWCANDLE (ouvertureHA, plushautHA, plusbasHA, clotureHA) COLOURED (100,200,100)
endif
if myRSI < 50 then
DRAWCANDLE (ouvertureHA, plushautHA, plusbasHA, clotureHA) COLOURED (200,100,100)
endif
if myRSI = 50 then
DRAWCANDLE (ouvertureHA, plushautHA, plusbasHA, clotureHA) COLOURED (100,100,100)
endif
RETURN