Hi,
I am about to give up.
I've create a label, and just want to change the color based on the quote value. I have used this same logic to compare other data, so I'm wondering if $ADVN returns a string or something different. Thank you so much for any help in advance!!!
def advn = close(symbol = "$ADVN");
AddLabel(yes, "advn:" + advn, if advn < 320 then color.green else color.gray);
Ideally I would want to not hardcode the number or colors:
If I can get this working, I will be super super grateful!
Ideally I would want to abstract the numbers and colors out, but I also can't figure out the syntax for the color. Many thanks!
I am about to give up.
I've create a label, and just want to change the color based on the quote value. I have used this same logic to compare other data, so I'm wondering if $ADVN returns a string or something different. Thank you so much for any help in advance!!!
def advn = close(symbol = "$ADVN");
AddLabel(yes, "advn:" + advn, if advn < 320 then color.green else color.gray);
Ideally I would want to not hardcode the number or colors:
If I can get this working, I will be super super grateful!
Ideally I would want to abstract the numbers and colors out, but I also can't figure out the syntax for the color. Many thanks!
def cold = Color.GRAY;
def warm = Color.DARK_GREEN;
def coldpoint = 320;
def advn = close(symbol = "$ADVN");
AddLabel(yes, "advn:" + advn, if advn < coldpoint then warm);