Navigation: Realtest Script Language > Syntax Element Details > HVOL Category Indicator Functions Description Historical volatility Syntax HVOL(len, ppy {252/52/12}) Parameters len - lookback period ppy - number of periods per year (optional) Notes HVOL(len) could be calculated as StdDev(log(c/c[1]),len) * 100 * Sqr(ppy). ppy defaults to S.BPY if the current bar size is Daily, 52 for Weekly, 12 for Monthly, 4 for Quarterly, 1 for Yearly. This function supports one-pass calculation when used in the Data Section with a non-variable count. Example HV20: HVOL(20) HV20w: HVOL(20, 52) The second line specifies 52 periods per year for weekly bar data. Copyright © 2020-2026 Systematic Solutions, LLC