Is it possible to add a different chart Aggregation Period as a lower study? I'm using the code below but it is not changing the aggregation. I trade on the 4h chart.
declare lower;
input agg = AggregationPeriod.hour;
def o = open(getUnderlyingSymbol());
def h = high(getUnderlyingSymbol());
def l = low(getUnderlyingSymbol());
def c = close(getUnderlyingSymbol());
AddChart(h,l,c,o,ChartType.candle,color.white);
AddChart(h,l,o,c,ChartType.candle,color.white);
declare lower;
input agg = AggregationPeriod.hour;
def o = open(getUnderlyingSymbol());
def h = high(getUnderlyingSymbol());
def l = low(getUnderlyingSymbol());
def c = close(getUnderlyingSymbol());
AddChart(h,l,c,o,ChartType.candle,color.white);
AddChart(h,l,o,c,ChartType.candle,color.white);
Last edited: