Defines aggregation period equal to two days (172,800,000 milliseconds).
def agg = AggregationPeriod.TWO_DAYS;
plot data = close(period = agg);
This example script draws the Close price plot with aggregation period equal to two days. Note that aggregation period used in this example cannot be less than chart aggregation period.