OPEN-SOURCE SCRIPT
Zaktualizowano 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.
Informacje o Wersji
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.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.
Skrypt open-source
W zgodzie z duchem TradingView twórca tego skryptu udostępnił go jako open-source, aby użytkownicy mogli przejrzeć i zweryfikować jego działanie. Ukłony dla autora. Korzystanie jest bezpłatne, jednak ponowna publikacja kodu podlega naszym Zasadom serwisu.
Wyłączenie odpowiedzialności
Informacje i publikacje nie stanowią i nie powinny być traktowane jako porady finansowe, inwestycyjne, tradingowe ani jakiekolwiek inne rekomendacje dostarczane lub zatwierdzone przez TradingView. Więcej informacji znajduje się w Warunkach użytkowania.