I tried pasting the above code into the v6.27 editor, then verifying or plotting it, both with and without something meaningful replacing the '//...do something ...' line.
But AB closes down without a message.
After reading the notes about using TimeFrameSet with volume here - AFL Function Reference - TIMEFRAMEMODE - I tried various values such as TimeFrameSet (1000000), TimeFrameSet (10000000), TimeFrameSet (100000000).
The data set being used is the Australian XJO symbol in daily format supplied by Norgate and has volume figures in the 400,000,000 to 800,000,000 range.
Is something else needed to use TimeFrame commands with volume?