lostcoastsurf
Member
Is it possible to get the data(volume) from the 1 minute timeframe when viewing the 15 minute chart? I would like to create a label that has the volume of the last 1 minute candle while viewing a 15 minute chart (or any larger timeframe than the 1 minute)
I noticed in the thinkorswim manual under MIN aggregation period it says, "aggregation period used in this example cannot be less than chart aggregation period." Does that mean it's not possible?
As a basic example here is what I have tried (finding the volume of the last 1' candle and comparing it to the previous 50 1' candles to see if there is a volume spike while viewing a 15' timeframe):
But when I switch the chart to the 15' (higher) timeframe the label doesn't show up.
I noticed in the thinkorswim manual under MIN aggregation period it says, "aggregation period used in this example cannot be less than chart aggregation period." Does that mean it's not possible?
As a basic example here is what I have tried (finding the volume of the last 1' candle and comparing it to the previous 50 1' candles to see if there is a volume spike while viewing a 15' timeframe):
Code:
input length = 50;
def agg = AggregationPeriod.MIN;
def volbuzz = (volume[1]/Average(volume, 50)) * 100;
AddLabel(1, "Vol: " +
Round(volbuzz, 0)
+ "%",
if volbuzz >= 200 then color.MAGENTA
else color.gray);
But when I switch the chart to the 15' (higher) timeframe the label doesn't show up.
Last edited: