OPEN-SOURCE SCRIPT
已更新 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.
發行說明
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.
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。