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.
Here is the complete list of features present in this indicator :
- 3 Standard Deviation line merged
- Multiple Source Type
- Standard Deviation Period (Day format)
- Standard Deviation Line 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.
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 https://mozilla.org/MPL/2.0/ // © RickSimpson //@version=4 study(title="Standard Deviation Volatility Helper", overlay=false) //Inputs sdsrc = input(defval=close, title="Standard Deviation Source") d = input(defval=1, title="Standard Deviation Period", minval=1) n = input(defval=30, title="Standard Deviation Length") esmooth = input(defval=false, title="Enable Smoothing?") sdmalen = input(defval=20, title="MA Smoothing Length") //Settings xPrice = log(close / close) StdDev = stdev(xPrice, n) Hv = StdDev exp = exp(Hv * sqrt(d)) //Calculation SD1 = esmooth ? sma(sdsrc * (exp), sdmalen) : sdsrc * (exp) SD2 = SD1 * (exp) SD3 = SD2 * (exp) SD1_ = esmooth ? sma(sdsrc / (exp), sdmalen) : sdsrc / (exp) SD2_ = SD1_ / (exp) SD3_ = SD2_ / (exp) //Plotting plot((stoch(close, SD3, SD3_, n))) hline(50) hline(20) hline(80)
The content covered on this website is NOT investment advice and I am not a financial advisor.