Hey all,
Ive been playing around with custom watchlists here lately.
my question is why are some of these labels correct and others not.
Was thinking if I have a cross down then it should be red, but not the case in all
Below is the code im using
Thanks yall
Ive been playing around with custom watchlists here lately.
my question is why are some of these labels correct and others not.
Was thinking if I have a cross down then it should be red, but not the case in all
Below is the code im using
Thanks yall
Code:
def EMA4 = ExpAverage(close, 4);
def EMA8 = ExpAverage(close, 8);
def EMA13 = ExpAverage(close, 13);
def EMA50 = ExpAverage(close, 50);
def bullish = EMA4 crosses above EMA13 within 3 bars;
def bearish = EMA4 crosses below EMA13 within 3 bars;
AddLabel(bullish, "Cross Up", color.black);
AddLabel(bearish, "Cross Down", color.black);
AddLabel(!bullish and !bearish, " ", color.black);
AssignBackgroundColor(if bullish then color.green else if bearish then color.red else color.black);