BiggySmall
New member
Hoping someone can help with this chart label.
I'm trying to get the label to reference the text "Day", instead of 1,440 (which is minutes).
Is there any way to reference just the portion after the period?
Thanks!!
input AggPeriod = AggregationPeriod.DAY;
I'm trying to get the label to reference the text "Day", instead of 1,440 (which is minutes).
Is there any way to reference just the portion after the period?
Thanks!!
input AggPeriod = AggregationPeriod.DAY;
Code:
# Label: MTF Stacked 21ema > 34ema Moving Averages
# Stacked = GREEN, Not = RED
input AggPeriod = AggregationPeriod.DAY;
def ema21 = ExpAverage(close(period = AggPeriod), 21);
def ema34 = ExpAverage(close(period = AggPeriod), 34);
AddLabel(close, (AggPeriod/1000/60) + " AggStacked 21/34” , (if ema21 > ema34 then Color.GREEN else Color.RED));