Standard Deviation Volatility Helper

Originally created by Adam White, the Standard Deviation trendline is the type of indicator generally used by institutionals. The stock is trending when it is above the signal and loses steam when it falls below the signal. Generally you should buy when it is above it’s signal and sell when it goes below the signal. Based on supply and demand which will help you easily find the expected move. 3 Merged line of standard deviation. Day Loopback and MA Length are adjustable.

Standard Deviation Volatility Helper in action on Gold CFD.

Screenshot taken from the Settings menu of Standard Deviation Volatility Helper.

Here is the complete list of features present in this indicator :

  • 3 Standard Deviation line merged
  • Standard Deviation Period (In Day)
  • Standard Deviation Length
  • Moving Average Length Smoothing

All indicators have their original default settings. You need to be able to readjust them depending on the market instrument you want to analyze.

Rate this Indicator?

Click on a star to rate it!

Average rating 4 / 5. Vote count: 2

No votes so far! Be the first to rate this Indicator.


Or copy / paste the source code into your pine editor :

// This source code is subject to the terms of the Mozilla Public License 2.0 at
// © RickSimpson

study("Standard Deviation Volatility Helper", 'StdDev VH', false)


sdsrc   = input(defval=close, title="Standard Deviation Source",           type=input.source)
d       = input(defval=1,     title="Standard Deviation Period", minval=1, type=input.integer)
n       = input(defval=30,    title="Standard Deviation Length", minval=1, type=input.integer)
esmooth = input(defval=false, title="Enable Smoothing?",                   type=input.bool)
sdmalen = input(defval=20,    title="MA Smoothing Length",       minval=1, type=input.integer)

//StdDev Function

xPrice   = log(close / close[1])
StdDev   = stdev(xPrice, n)
Hv       = StdDev
exp      = exp(Hv * sqrt(d))

SD1  = sdsrc * (exp)
SD2  = SD1   * (exp)
SD3  = SD2   * (exp)
SDM  = (SD1  + SD2  + SD3)  / 3
SD1_ = sdsrc / (exp)
SD2_ = SD1_  / (exp)
SD3_ = SD2_  / (exp)
SDM_ = (SD1_ + SD2_ + SD3_) / 3
SM   = (SDM  + SDM_) / 2


output         = (stoch(close, SD3, SD3_, n))
outputsmoothed = ema(output, sdmalen)
render         = esmooth ? outputsmoothed : output

The content covered on this website is NOT investment advice and I am not a financial advisor.