Goingdark365
Member
so i am trying to create a WL with day close vs week high or low i figured a work around how to get w and day info to work but wanted to see if there is a better way do i don’t have to adjust every day
basically takes the day close subtract by week low or high to see with direction would give multiple brake same time
#trying to make this work
def wh = high (period = "WEEK")[1];
def wl = low (period = "WEEK")[1];
def dc = close (period = "DAY");
# this is the work around but I would have to adjust the length everyday
input length = 5;
def HH = Highest(high, length);
def LL = Lowest(low, length);
def H1 = (HH- DC);
def L1 = (DC - LL );
#def high_diffrence = (wh - dc);
#def low_diffrence = (wl - dc);
#ADDLabel(YES, "H " + H1 + " L " + L1, color.black);
ADDLabel(YES, IF H1 < L1 THEN "L " + H1 ELSE" S " + L1, color.black);
assignBackgroundColor (if H1 < L1 then color.light_green else color.light_red );
#assignBackgroundColor (if H1 < L1 then color.light_green else if ll < L1 then color.light_red else color.black);
basically takes the day close subtract by week low or high to see with direction would give multiple brake same time
#trying to make this work
def wh = high (period = "WEEK")[1];
def wl = low (period = "WEEK")[1];
def dc = close (period = "DAY");
# this is the work around but I would have to adjust the length everyday
input length = 5;
def HH = Highest(high, length);
def LL = Lowest(low, length);
def H1 = (HH- DC);
def L1 = (DC - LL );
#def high_diffrence = (wh - dc);
#def low_diffrence = (wl - dc);
#ADDLabel(YES, "H " + H1 + " L " + L1, color.black);
ADDLabel(YES, IF H1 < L1 THEN "L " + H1 ELSE" S " + L1, color.black);
assignBackgroundColor (if H1 < L1 then color.light_green else color.light_red );
#assignBackgroundColor (if H1 < L1 then color.light_green else if ll < L1 then color.light_red else color.black);