Ruby:
def C = close(period = AggregationPeriod.DAY)[1];
AddLabel(1, c + " yesterday close", if c > 3 then color.green else color.red);
Can someone please help me understand why the code above shows a different close price on a 5min chart vs a daily chart? I am trying to get the correct previous day close price to show up on a 5m chart. It will only show correct on a loaded daily chart. I though the AggregationPeriod.DAY would do it on a 5m chart but I am getting a different close price on Futures.