Volume Indicators Feature Image on FloatChecker

Better Volume Indicators for Thinkorswim

The default chart settings for Thinkorswim leave much to be desired when it comes to volume. But with minimal effort, you can add some helpful information using the built-in programming language thinkScript. Fortunately, for our purposes, you don’t need to be a programmer to take advantage of the benefits of thinkScript. Just follow along with this video from FloatChecker and we’ll show you how to copy and paste the script provided below.

Watch on YouTube

The script below adds a number of easy-to-read labels to your chart that will help you keep track of volume during the day. You will get the Total Volume for the Day, Volume of the Current Bar, Volume of the Previous Bar, and Total Premarket Volume. The script will also give you dual-colored volume bars that provide a graphical depiction of the buying and selling volume for each candle. You can customize the colors and order of the different labels to your liking. It’s easy!

And once you become more comfortable, you can research and add your own scripts using many of the free websites online where people post their thinkScripts. That’s exactly what we did. We put our script together based on different ones we researched on the web. But make sure you are comfortable with relying on any of the scripts you find. For example, we noticed that the Total Premarket Volume returned by our thinkScript is slightly lower than the total premarket volume listed for a stock on Nasdaq.com. In addition, the dual-colored volume bar script is available on several different websites. Some commenters online have noted that it may not be an accurate representation of buying and selling volume in a volume bar. As with all trading-related decisions, do your own research and only rely on information you are comfortable with. You can always delete portions of the script you don’t want. Hopefully the script below can be a helpful starting point as you begin to work with thinkScript.

####################################################################################

#Total Volume for Regular Trading Day
AddLabel(yes, "Total Vol: " + volume(period = AggregationPeriod.DAY), Color.WHITE);

####################################################################################

#Volume of Current Bar
AddLabel(yes, "CurrentBar Vol: " + volume, Color.LIGHT_GREEN);

####################################################################################

#Volume of the Last Bar
AddLabel(yes, "LastBar Vol: " + volume[1], Color.LIGHT_ORANGE);

####################################################################################

#PreMarket Volume
input startTime = 0400;
input endTime = 0929;
def startCounter = SecondsFromTime(startTime);
def endCounter = SecondsTillTime(endTime);
def targetPeriod = if startCounter >= 0 and endCounter >= 0 then 1 else 0;
rec volumeTotal = if targetPeriod and !targetPeriod[1] then volume else if targetPeriod then volumeTotal[1] + volume else volumeTotal[1];
AddLabel(yes, Concat("PreMrket Vol: ", volumeTotal), Color.VIOLET);

####################################################################################

#Volume color coded by amount of volume on up-tick versus amount of volume on down-tick

declare lower;

def O = open;
def H = high;
def C = close;
def L = low;
def V = volume;
def Buying = V * (C - L) / (H - L);
def Selling = V * (H - C) / (H - L);

# Selling Volume
plot SV = Selling;
SV.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
SV.SetDefaultColor(Color.RED);
SV.HideTitle();
SV.HideBubble();
SV.SetLineWeight(5);

# Buying Volume
# Plot BV = Buying;
# Note that Selling + Buying Volume = Volume.
plot BV =  volume;
BV.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);
BV.SetDefaultColor(Color.DARK_GREEN);
BV.HideTitle();
BV.HideBubble();
BV.SetLineWeight(5);

####################################################################################
#Create an average volume line based on last 50 bars

input length = 50;
plot Vol = volume;
plot VolAvg = Average(volume, length);
Vol.SetPaintingStrategy(PaintingStrategy.HISTOGRAM);

####################################################################################