Please, can anyone help with this (
ThinkOrSwim)? I am trying to display "BULLISH DAY" or "BEARISH DAY" based on whether the main PIVOT LINE is below or above the Previous Day Close.
That is if Main Pivot Line is above Previous Day Close, Display BEARISH and if Main Pivot Line is below Previous Day Close, Display BULLISH.
I have the below code but I am NOT skilled enough to make do the above. The attachment shows what the below code is showing, which is not what I want.
input aggregationPeriod = AggregationPeriod.DAY;
def PreDayClose = close(period = aggregationPeriod)[1];
def PH = high(period = aggregationPeriod)[1];
def PL = low(period = aggregationPeriod)[1];
def PC = close(period = aggregationPeriod)[1];
plot close = PreDayClose;
def PP = (PH + PL + PC) / 3;
def BULL = PP < PreDayClose;
def BEAR = PP > PreDayClose;
AddLabel(yes, "BULLISH =" + BULL, Color.GREEN);
AddLabel(yes, "BEARISH =" + BEAR, Color.YELLOW);