Advertisement
kocurekc

HL_HV Volatility

Apr 22nd, 2014
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. study("HL_HV Volatility")
  2. // HL_HV Volatility
  3. //
  4. // Rewrite for Tradingview "Pine Script" by Kocurekc, April 2014
  5. // https://getsatisfaction.com/tradingview/
  6. // https://www.tradingview.com/u/kocurekc/
  7. // Code is provided as public domain, no warranty
  8.  
  9. len = input(title="Lookback Period", type=integer, defval=14, minval=2)
  10.  
  11. xSubT = log(high/low)
  12. SofS = pow(sum(pow(xSubT,2),len)/len, 0.5)
  13. hline(0.02, linestyle=dashed)
  14. plot(SofS)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement