OPEN-SOURCE SCRIPT
Helios Volatility Forecast [JOAT]

Helios Volatility Forecast [JOAT]
Helios Volatility Forecast is a Yang-Zhang volatility estimator with regime classification, a volatility cone (historical percentile bands), an HMA-smoothed forecast line, and a position-size suggestion. Volatility is classified into four regimes (LOW / NORMAL / ELEVATED / EXTREME) by percentile rank against its own history. Cross-pane elements paint a soft regime tint and a position-multiplier suggestion onto the price chart.

What makes it different
How it works
Reading the chart
Signals
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
How traders use this
Limitations
Compatibility
Pine Script v6 open-source indicator (pane plus cross-pane). Any symbol, any timeframe. Cross-pane elements use force_overlay=true. No request.security calls.
Defaults
20-bar Yang-Zhang window, 100-bar regime lookback, 5-bar HMA forecast, mint / red / amber palette, top-right medium dashboard.
Credits
Helios Volatility Forecast is a Yang-Zhang volatility estimator with regime classification, a volatility cone (historical percentile bands), an HMA-smoothed forecast line, and a position-size suggestion. Volatility is classified into four regimes (LOW / NORMAL / ELEVATED / EXTREME) by percentile rank against its own history. Cross-pane elements paint a soft regime tint and a position-multiplier suggestion onto the price chart.
What makes it different
- Most volatility indicators use a simple close-to-close standard deviation, which discards intraday range information and ignores overnight gaps. The Yang-Zhang estimator combines four components — overnight close-to-open variance, intraday open-to-close variance, and a Rogers-Satchell range term — into a single estimator that is more accurate than close-to-close for instruments that gap.
- A 4-band volatility cone (5th, 25th, 50th, 75th, 95th percentile of the past 100 bars) is plotted around the current volatility, with gradient fills bracketing tails and the interquartile range.
- A 4-regime classifier (LOW / NORMAL / ELEVATED / EXTREME by percentile thresholds at 25, 65, 90) drives a cross-pane tint on the price chart and a numeric position-size multiplier suggestion. The suggestion scales inversely with realized vol — wider sizes in low-vol regimes, halved sizes in extreme-vol regimes.
- An HMA forecast line projects the smoothed vol trajectory ahead. Forecast-crossing-realized alerts fire when expansion or contraction is imminent.
How it works
- Yang-Zhang formula combines overnight return, intraday return, and Rogers-Satchell range term, weighted by k = 0.34 / (1.34 + (len + 1) / (len - 1)).
- Percentile rank of sigma_yz over a 100-bar history equals vol_pct.
- Regime classification: LOW below 25, NORMAL 25 to 65, ELEVATED 65 to 90, EXTREME above 90.
- HMA of sigma_yz equals the forecast. Forecast direction equals the sign of (forecast minus current).
- Position-size multiplier equals clamp(1.5 minus vol_pct / 100, 0.3, 1.5).
- Vol-of-vol (stdev of recent realized vol) feeds a regime stickiness indicator.
Reading the chart
- In-pane: regime-tinted volatility line (vivid mint for LOW, neutral white for NORMAL, amber for ELEVATED, vivid red for EXTREME), HMA forecast line with direction-color flow, five vol-cone percentile lines.
- Cross-pane: soft regime tint background on the price chart, plus a Size x0.50 EXTREME vol label updating each bar.
- A vol-of-vol panel as a sub-strip at the top of the pane.
- Five right-edge cone percentile labels (p5 / p25 / p50 / p75 / p95).
- A current-vol percentile rank label.
- Regime change timeline labels on the price chart at each regime transition.
- Cross-pane vol-cone touch markers when vol crosses p95 (breakout) or p5 (contraction).
- A regime stickiness indicator (how long the regime has been in its current state).
- Forward expected-range lines on the price chart (close plus or minus forecast times ATR scalar).
Signals
- Regime up / down (any percentile-bucket transition)
- Extreme vol entry
- Low vol entry
- Vol breakout (sigma crosses above p95 of its own history)
- Vol contract (sigma crosses below p5)
- Vol Z-shock up / down (when vol z-score exceeds plus or minus 2)
- Forecast cross up / down (forecast vs realized)
All gated on barstate.isconfirmed or barstate.ishistory. No future references. No lookahead_on.
Inputs
- Volatility: Yang-Zhang window, regime percentile lookback, forecast HMA length.
- Visual: bullish (low vol) color, bearish (extreme vol) color, elevated (amber) color, cone toggle, forecast toggle, cross-pane candles toggle, regime pulse toggle.
- Dashboard: position, size.
How traders use this
- Position sizing: scale entries inversely with the regime. Full size in LOW, default in NORMAL, half in ELEVATED, third in EXTREME. The multiplier label provides the suggested factor.
- Volatility breakouts: vol crossing above p95 historically precedes large directional moves. Tighten trailing stops or reduce holding time.
- Volatility contraction: vol crossing below p5 historically precedes range / chop. Reduce directional bias. Consider mean-reversion strategies.
- Regime-aware stops: in ELEVATED or EXTREME regimes, ATR-based stops should be wider. In LOW regimes, tighter. The pos-mult label codifies this implicitly.
Limitations
- Yang-Zhang assumes log-normal returns and lognormality breaks down during fat-tail events (it under-estimates vol in true crash regimes).
- Percentile classification needs sufficient history. The default 100-bar lookback can be lengthened for stable instruments.
- The position-size multiplier is a heuristic, not a portfolio-management recommendation. Combine with your own risk-management framework.
- The HMA forecast lags slightly behind real-time changes. Treat as smoothed trend, not pinpoint prediction.
Compatibility
Pine Script v6 open-source indicator (pane plus cross-pane). Any symbol, any timeframe. Cross-pane elements use force_overlay=true. No request.security calls.
Defaults
20-bar Yang-Zhang window, 100-bar regime lookback, 5-bar HMA forecast, mint / red / amber palette, top-right medium dashboard.
Credits
- Yang-Zhang estimator from D. Yang and Q. Zhang, Drift-Independent Volatility Estimation Based on High, Low, Open, and Close Prices, Journal of Business (2000).
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.
오픈 소스 스크립트
트레이딩뷰의 진정한 정신에 따라, 이 스크립트의 작성자는 이를 오픈소스로 공개하여 트레이더들이 기능을 검토하고 검증할 수 있도록 했습니다. 작성자에게 찬사를 보냅니다! 이 코드는 무료로 사용할 수 있지만, 코드를 재게시하는 경우 하우스 룰이 적용된다는 점을 기억하세요.
The AI Trading Ecosystem, Built to win trades 📈
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
Get Full Access 👇
jackofalltrades.vip 🌐
t.me/jackofalltradesvip 🃏
면책사항
해당 정보와 게시물은 금융, 투자, 트레이딩 또는 기타 유형의 조언이나 권장 사항으로 간주되지 않으며, 트레이딩뷰에서 제공하거나 보증하는 것이 아닙니다. 자세한 내용은 이용 약관을 참조하세요.