OPEN-SOURCE SCRIPT
Updated RTH Gaps and Expected Move

Daily Expected Move (Rule of 16) + RTH Gaps
Two things worth knowing at the cash open: how far the day is likely to travel, and what unfilled space the overnight session left behind.
Expected move
The script divides the volatility index by sqrt(252) ≈ 16 to turn annualised implied volatility into a one-day standard deviation, then draws 0.5σ, 1σ, 2σ and 3σ around the previous RTH close (session open optional). Levels are fixed at the open and cannot repaint; the index value used is the previous session's last value. The index follows the symbol: VXN for Nasdaq, RVX for Russell, VXD for Dow, VIX otherwise, or set your own. Past sessions can be kept on the chart for backtesting; each old line stops at the last bar of its session.
RTH gaps
At each session open the script boxes the distance between that open and the previous RTH close. As price trades into a gap the box shrinks from the current bar onward while the part to the left keeps its original height, so the gap leaves a staircase showing how large it was at every bar. The box is deleted once price crosses it fully.
Table
The current session's levels, highest to lowest, with the last price slotted between the level above and below it, and the distance to each in points, ticks or percent.
Use it on an intraday chart set to regular trading hours
It runs on 24-hour charts too, but there the overnight bars mitigate the gaps, so a gap can be marked filled by a thin 3 a.m. move. Daily charts and higher are not supported.
Originality
Gap boxes and expected-move levels exist separately elsewhere. Here the gap boxes keep their history instead of erasing it, and both features share one anchor (the previous RTH close) so a gap can be read against the expected move directly.
Limitations
Gaps are only measured at session boundaries; set the session input to match your instrument. The expected move assumes normally distributed returns, so real tails are fatter than ±3σ suggests. TradingView allows 500 boxes, lines and labels per scrip; the three maximum inputs exist for that reason, and raising them past the budget makes the oldest drawings vanish silently. No levels are drawn if the volatility index has no data.
Two things worth knowing at the cash open: how far the day is likely to travel, and what unfilled space the overnight session left behind.
Expected move
The script divides the volatility index by sqrt(252) ≈ 16 to turn annualised implied volatility into a one-day standard deviation, then draws 0.5σ, 1σ, 2σ and 3σ around the previous RTH close (session open optional). Levels are fixed at the open and cannot repaint; the index value used is the previous session's last value. The index follows the symbol: VXN for Nasdaq, RVX for Russell, VXD for Dow, VIX otherwise, or set your own. Past sessions can be kept on the chart for backtesting; each old line stops at the last bar of its session.
RTH gaps
At each session open the script boxes the distance between that open and the previous RTH close. As price trades into a gap the box shrinks from the current bar onward while the part to the left keeps its original height, so the gap leaves a staircase showing how large it was at every bar. The box is deleted once price crosses it fully.
Table
The current session's levels, highest to lowest, with the last price slotted between the level above and below it, and the distance to each in points, ticks or percent.
Use it on an intraday chart set to regular trading hours
It runs on 24-hour charts too, but there the overnight bars mitigate the gaps, so a gap can be marked filled by a thin 3 a.m. move. Daily charts and higher are not supported.
Originality
Gap boxes and expected-move levels exist separately elsewhere. Here the gap boxes keep their history instead of erasing it, and both features share one anchor (the previous RTH close) so a gap can be read against the expected move directly.
Limitations
Gaps are only measured at session boundaries; set the session input to match your instrument. The expected move assumes normally distributed returns, so real tails are fatter than ±3σ suggests. TradingView allows 500 boxes, lines and labels per scrip; the three maximum inputs exist for that reason, and raising them past the budget makes the oldest drawings vanish silently. No levels are drawn if the volatility index has no data.
Release Notes
Added "Show current price location" to the sigma table. The table keeps a row for the last price between the level above and the level below it.
The table shows the levels only.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.