Defines aggregation period equal to four hours (14,400,000 milliseconds).
def agg = AggregationPeriod.FOUR_HOURS;
plot data = close(period = agg);
This example script draws the Close price plot with aggregation period equal to four hours. Note that aggregation period used in this example cannot be less than chart aggregation period.