indicator · own pane · open source

Historical Volatility

Deepwick · @deepwickv1Updated 2 Oct 2026▲ 0 users
Running…
Loading chart…

About

Historical Volatility annualises the rolling standard deviation of log returns — the classic vol number used by options traders and risk managers.

  • Read it as expected 1-year move if today's regime persists.
  • Useful for sizing stops and comparing implied vs realised vol.

Source code

//@version=5
indicator("Historical Volatility", overlay=false)
len = input.int(20, "Lookback", minval=2, maxval=252)
src = input.source("close", "Source")
hv = 100 * ta.stdev(ta.change(src) / src[1], len) * math.sqrt(252)
p_HV__ = plot(hv, "HV %", color=color.orange, linewidth=2)

Comments

No comments yet.

Sign in to comment.