In today’s video, we’re going to build the most requested tutorial – the VScore Indicator. So many of you e-mailed us about this, so we looked into what the VScore is, what value it provides and how we could build something similar to it.  

**10/6/19 Update: Feature Added — Ability to Set Custom Standard Deviation Value in Label

Welcome to the fifth episode of “How to Thinkscript”. We are, home of the Volatility Box, the most robust ThinkOrSwim indicator based on statistical models built for large institutions and hedge funds.

Our version is available for download for free below.

There are a few different stores online that have their own versions (both paid and free) — Easycators sells it here ($130), and Simpler Trading sells it here ($897). There are also quite a few different free versions for different platforms, like TradingView and ProRealTime. But there were no free versions for ThinkOrSwim.

So… we built one! And we made ours better.

Here are some bells & whistles that we’ve added to our version of the V-Score:

Improvements & Enhancements
  • Translate Standard Deviation Cryptic Code into Real-World Prices
  • Automatically Switch Between End of Day and Intraday V-Scores
  • Easily Plan Entries, Exits, and Stops All Ahead of Time
  • Identify “Winning Standard Deviation” Trend With Colors
  • Clear Buy/Sell Signals Using Reversion to Mean
  • Alerts Included Below

If you’d like to skip the tutorial and start playing with the indicator right away, you can download the VScore for free below.

What is the VScore Indicator?

The V-Score is a trading indicator that helps you understand and plot price behavior in relation to its standard deviation, using the VWAP bands.

The V-Score helps you understand whether you’re predominantly above or below the mean, and what a true reversion to the mean looks like with a volume-weighted-average-price (VWAP).

You can anchor the VScore to any particular date, and use the tool to understand whether we’ve pulled back enough to a place where the symbol has usually found support, or where resistance has generally presented itself.

thinkscript Copy/Paste Code:

The Anchored VWAP code is available here.

The calculation for the V-Score, using the thinkscript format is included below for copy/paste:

plot VScore = if (((price - close)*(-1))/deviation) > 5 or (((price - close)*(-1))/deviation) < -5 then 0 else (((price - close)*(-1))/(deviation));

The code for the clouds, which help you determine which area the V-Score spends the most time in-between is included below:

def cloud1;
def cloud2;
if Sum(zeroAndOne, barsGoBack) > Sum(OneAndTwo,barsGoBack) and Sum(zeroAndOne, barsGoBack) > Sum(twoAndThree,barsGoBack) and Sum(zeroAndOne, barsGoBack) > Sum(negZeroAndOne,barsGoBack) and Sum(zeroAndOne, barsGoBack) > Sum(negoneAndTwo,barsGoBack) and Sum(zeroAndOne, barsGoBack) > Sum(negtwoAndThree,barsGoBack){
    cloud1 = zero;
    cloud2 = one;
else if Sum(OneAndTwo, barsGoBack) > Sum(zeroAndOne,barsGoBack) and Sum(OneAndTwo, barsGoBack) > Sum(twoAndThree,barsGoBack) and Sum(OneAndTwo, barsGoBack) > Sum(negZeroAndOne,barsGoBack) and Sum(OneAndTwo, barsGoBack) > Sum(negoneAndTwo,barsGoBack) and Sum(OneAndTwo, barsGoBack) > Sum(negtwoAndThree,barsGoBack){ 
    cloud1 = one;
    cloud2 = two;
else if Sum(twoAndThree, barsGoBack) > Sum(zeroAndOne,barsGoBack) and Sum(twoAndThree, barsGoBack) > Sum(oneAndTwo,barsGoBack) and Sum(twoAndThree, barsGoBack) > Sum(negZeroAndOne,barsGoBack) and Sum(twoAndThree, barsGoBack) > Sum(negoneAndTwo,barsGoBack) and Sum(twoAndThree, barsGoBack) > Sum(negtwoAndThree,barsGoBack){ 
    cloud1 = two;
    cloud2 = three;
else if Sum(negZeroAndOne, barsGoBack) > Sum(zeroAndOne,barsGoBack) and Sum(negZeroAndOne, barsGoBack) > Sum(oneAndTwo,barsGoBack) and Sum(negZeroAndOne, barsGoBack) > Sum(twoAndThree,barsGoBack) and Sum(negZeroAndOne, barsGoBack) > Sum(negoneAndTwo,barsGoBack) and Sum(negZeroAndOne, barsGoBack) > Sum(negtwoAndThree,barsGoBack){ 
    cloud1 = zero;
    cloud2 = negOne;
else if Sum(negoneAndTwo, barsGoBack) > Sum(zeroAndOne,barsGoBack) and Sum(negoneAndTwo, barsGoBack) > Sum(oneAndTwo,barsGoBack) and Sum(negoneAndTwo, barsGoBack) > Sum(twoAndThree,barsGoBack) and Sum(negoneAndTwo, barsGoBack) > Sum(negZeroAndOne,barsGoBack) and Sum(negoneAndTwo, barsGoBack) > Sum(negtwoAndThree,barsGoBack){ 
    cloud1 = negOne;
    cloud2 = negTwo;
else if Sum(negtwoAndThree, barsGoBack) > Sum(zeroAndOne,barsGoBack) and Sum(negtwoAndThree, barsGoBack) > Sum(oneAndTwo,barsGoBack) and Sum(negtwoAndThree, barsGoBack) > Sum(twoAndThree,barsGoBack) and Sum(negtwoAndThree, barsGoBack) > Sum(negZeroAndOne,barsGoBack) and Sum(negtwoAndThree, barsGoBack) > Sum(negOneAndTwo,barsGoBack){ 
    cloud1 = negTwo;
    cloud2 = negThree;
else {
    cloud1 = Double.nan;
    cloud2 = Double.nan;
AddCloud(cloud1, cloud2, color.light_red, color.light_green);

Code if you would like to add alerts every time the V-Score triggered a bullish or bearish entry is included below:

input soundAlertsOn = yes;
Alert((cloud1 == one or cloud2 == one or cloud1 == two or cloud2 == two or cloud1 == three or cloud2 == three) and (VScore <= 0 and VScore[1] > 0) and (SoundAlertsOn), "Bullish VScore Entry", Alert.BAR);
Alert((cloud1 == negOne or cloud2 == negone or cloud1 == negtwo or cloud2 == negtwo or cloud1 == negthree or cloud2 == negthree) and (VScore >= 0 and VScore[1] < 0)and (SoundAlertsOn), "Bearish VScore Entry", Alert.BAR);

Click the button below to download the VScore Indicator