This should fix that issue.
Whenever that happens, try the fix to the def pcClose close(symbol = "$PCALL") as shown in the code below
1) By having any missing periods in def pcClose, shown as isnan(close(symbol = "$PCALL")) ,
filled by referencing those to the prior value of pcClose, shown as pcClose[1]
2) otherwise pcClose will use the actual value of close(symbol = "$PCALL").
Hey SleepyZ, I was wondering if you could help me out with this one: So I have an ATR label that has the same issue as the last P/C label you helped me out with. It's only being displayed on certain time frames but not all. I was trying out what you had mentioned above with the closing command code but still having issues. The label does not display on higher time frames and I'm trying to figure out how to get it to be displayed across all time frames. Thank you for your time and help greatly appreciated. Here is the code:
input length = 14;
input averageType = AverageType.WILDERS;
input agg1 = AggregationPeriod.DAY;
input agg2 = AggregationPeriod.WEEK;
input agg3 = AggregationPeriod.MONTH;
def h1 = high(period = agg1);
def c1 = close(period = agg1);
def l1 = low(period = agg1);
def h2 = high(period = agg2);
def c2 = close(period = agg2);
def l2 = low(period = agg2);
def h3 = high(period = agg3);
def c3 = close(period = agg3);
def l3 = low(period = agg3);
def ATR1 = MovingAverage(averageType, TrueRange(h1, c1, l1), length);
def ATR2 = MovingAverage(averageType, TrueRange(h2, c2, l2), length);
def ATR3 = MovingAverage(averageType, TrueRange(h3, c3, l3), length);
AddLabel(1, "ATR D: " + AsText(ATR1) + " W: " + AsText(ATR2) + " M: " + AsText(ATR3), CreateColor(255, 255, 255));