TD Ameritrade's Thinkorswim platform is easily one of the most commonly used trading platforms available. It's used by traders worldwide for stocks, ETFs, options, futures, forex, etc and has countless tools and features such as 300+ chart indicators/studies, a customizable stock scanner, and detailed analysis features to name a few. However, one thing the thinkorswim platform lacks is something that many traders (myself included) use on a daily basis for every trade... volume data!

There are ways to find out volume stats in thinkorswim, but none of them are nearly as intuitive as they should be for as powerful as the platform is. I've seen a lot of others complaining about this same issue so I wanted to share a way to fix this. Thankfully, thinkorswim allows users to create their own custom studies/indicators using their own programming language known as thinkscript. With thinkscript, traders have been able to create a custom volume study to fix the lack of volume data shown in the thinkorswim platform.

custom thinkorswim volume study thinkscript

You can see an example of what it looks like at the bottom of the chart above. It's very easy to use and pretty self-explanatory for the most part. Here's what each section of the volume indicator means:

Daily Avg: This tells you the average daily volume for the selected stock over the past 30 trading days.

Today: This tells you the current volume for the day.

%: The percentage in the 3rd box of the study tells you how the current volume relates to the average volume. As you can see in the above example, the stock symbol MARK traded 116,546,323 shares, which is 357% of its daily average of 32,891,032 shares.

Avg 30 Bars: This tells you the average volume traded over the past 30 bars/candles. This differs from the "Daily Avg" because this can be the average over any period of time, not just an entire day. For example, because the example above is a 1 minute chart, the 370,602 next to "Avg 30 Bars" is the average amount of shares traded over the past 30 minutes.

Cur Bar: This tells you how the volume in the current bar relates to the average volume of the past 30 bars. This can give you an idea of when volume is starting to slow down, often indicating the end of a trend.

Keep in mind, the data shown in this study is going to reflect the time frame of whatever chart it's applied to. This example happens to be the 1 minute chart, but it can be used for any time frame!

In order to add this study to your own thinkorswim charts, you can follow the instruction below.

Step 1: Click on "Edit Studies" on the chart you'd like to apply the study to.

custom thinkorswim volume study

Step 2: Click on "Create: on the bottom left of the "Edit Studies" pop-up box.

custom thinkorswim volume study

Step 3: Copy and paste the text at the bottom of this post into the thinkscript box (after removing any default thinkscript), rename you new study to "CustomVolume" or anything similar, click "OK" and apply your new study to your chart!

custom thinkorswim volume study

declare lower;
#Inputs
input Show30DayAvg = yes;
input ShowTodayVolume =  yes;
input ShowPercentOf30DayAvg = yes;
input UnusualVolumePercent = 200;
input Show30BarAvg = yes;
input ShowCurrentBar = yes;
#Volume Data
def volLast30DayAvg = (volume(period = "DAY")[1] + volume(period = "DAY")[2] + volume(period = "DAY")[3] + volume(period = "DAY")[4] + volume(period = "DAY")[5] + volume(period = "DAY")[6] + volume(period = "DAY")[7] + volume(period = "DAY")[8] + volume(period = "DAY")[9] + volume(period = "DAY")[10] + volume(period = "DAY")[11] + volume(period = "DAY")[12] + volume(period = "DAY")[13] + volume(period = "DAY")[14] + volume(period = "DAY")[15] + volume(period = "DAY")[16] + volume(period = "DAY")[17] + volume(period = "DAY")[18] + volume(period = "DAY")[19] + volume(period = "DAY")[20] + volume(period = "DAY")[21] + volume(period = "DAY")[22] + volume(period = "DAY")[23] + volume(period = "DAY")[24] + volume(period = "DAY")[25] + volume(period = "DAY")[26] + volume(period = "DAY")[27] + volume(period = "DAY")[28] + volume(period = "DAY")[29] + volume(period = "DAY")[30]) / 30;
def today = volume(period = "DAY");
def percentOf30Day = Round((today / volLast30DayAvg) * 100, 0);
#def avg30Bars = VolumeAvg(30).VolAvg;
def avg30Bars = (volume[1] + volume[2] + volume[3] + volume[4] + volume[5] + volume[6] + volume[7] + volume[8] + volume[9] + volume[10] + volume[11] + volume[12] + volume[13] + volume[14] + volume[15] + volume[16] + volume[17] + volume[18] + volume[19] + volume[20] + volume[21] + volume[22] + volume[23] + volume[24] + volume[25] + volume[26] + volume[27] + volume[28] + volume[29] + volume[30]) / 30;
def curVolume = volume;
# Labels
AddLabel(Show30DayAvg, "Daily Avg: " + Round(volLast30DayAvg, 0), Color.LIGHT_GRAY);
AddLabel(ShowTodayVolume, "Today: " + today, (if percentOf30Day >= UnusualVolumePercent then Color.GREEN else if percentOf30Day >= 100 then Color.ORANGE else Color.LIGHT_GRAY));
AddLabel(ShowPercentOf30DayAvg, percentOf30Day + "%", (if percentOf30Day >= UnusualVolumePercent then Color.GREEN else if percentOf30Day >= 100 then Color.ORANGE else Color.WHITE) );
AddLabel(Show30BarAvg, "Avg 30 Bars: " + Round(avg30Bars, 0), Color.LIGHT_GRAY);
AddLabel(ShowCurrentBar, "Cur Bar: " + curVolume, (if curVolume >= avg30Bars then Color.GREEN else Color.ORANGE));

Thanks for reading and I hope you found this post useful! If you'd like to learn more about the thinkorswim platform, along with step-by-step trading and investing lessons/strategies, get started as a Market Master by clicking the button below and joining one of our programs!


Ready to learn more & Master the Market? Click below!