Wednesday, December 7, 2011

ToS Range Bar Volume

I was doing a little more reading on the thinkorswim Resource Center and confirmed that volume is ignored when using the Range Bar aggregation type. Just know that when you are looking at a chart with associated studies that causes them not to show up correctly.

Given that, how would you show a time based data on a study with range bars specified? Many of the Fundamental functions all you to specify an aggregation period using the term "period".  For example, let's say you wanted to plot the ten day average closing price with daily aggregation:

thinkscript:
plot CloseData = Average(close(period = AggregationPeriod.DAY), 10);
plot VolumeData = Average(volume(period = AggregationPeriod.DAY), 10);

The CloseData plot works great. But, the plot for the "volume" fundamental function doesn't appear to function as expected. Additionally, it may be causing the ToS platform to hang. I've also had some other adverse behavior with the platform when trying to view other tickers with range bars enabled. I'm going to update the development team and see if there are some known issues. Maybe there are some limitations that I've missed. I think it'd help to read the release notes.