Mr D
New member
Ruby:
##########################################
# Hull Acceleration WL Column #
# Color codes: #
# Hull up and accelerating: bright green #
# Hull dn and accelerating: bright red #
# Hull up : dark green #
# Hull dn : dark red #
##########################################
input length = 16;
input src = close;
def hma= WMA(2 * WMA(src, length / 2) - WMA(src, length), Round(Sqrt(length)));
plot rsi= 100*(hma-hma[1])/atr()[1];
def up = rsi>rsi[1] and rsi>0;
def dn = rsi<rsi[1] and rsi<0;
rsi.assignValueColor( if dn or up then color.black else color.white);
assignbackgroundcolor(if up then color.green else if dn then color.red
else if rsi>0 then color.dark_green else color.dark_red);
#######
# END #
#######