indicator · own pane · open source
Garman-Klass Volatility indicator
Garman-Klass Volatility is a free open-source indicator. Garman-Klass Volatility adds an open-to-close variance term to the Parkinson high-low… Deepwick Script runs a subset of Pine Script.
Running…
Loading chart…
What Garman-Klass Volatility does
Garman-Klass Volatility adds an open-to-close variance term to the Parkinson high-low estimator.
- More efficient than Parkinson because it uses the open in addition to the range.
- Best for liquid instruments where the open prints near the prior close.
Source code
Deepwick Script, a subset of Pine Script · read-only
//@version=6
indicator("Garman-Klass Volatility", overlay=false)
len = input.int(20, "Lookback", minval=2, maxval=252)
colorBg = input.color("color.purple", "Color Bg")
gkX = 0.5 * math.pow(math.log(high / low), 2) - (2 * math.log(2) - 1) * math.pow(math.log(open / close), 2)
gkSum = ta.cum(gkX) - ta.cum(gkX)[len]
gk = math.sqrt(252 / len * gkSum)
p_GK = plot(gk, "GK", color=colorBg, linewidth=2)
No comments yet.
Sign in to comment.