OPEN-SOURCE SCRIPT
Range Lattice

## RangeLattice
RangeLattice constructs a higher-timeframe scaffolding on any intraday chart, locking in structural highs/lows, mid/quarter grids, VWAP confluence, and live acceptance/break analytics. It provides a non-repainting overlay that turns range management into a disciplined process.
HOW IT WORKS
HOW TO USE IT
VISUAL FEATURES
PARAMETERS
ALERTS
The indicator includes five alert conditions:
Where it works best
This indicator works best on liquid instruments with clear structural levels. On very low timeframes (1-minute and below), the structure may update too frequently to be useful. The acceptance/break confirmation system requires patience—faster traders may find the multi-bar confirmation too slow for scalping. The VWAP fan is session-based and resets daily, which may not suit all trading styles.
RangeLattice constructs a higher-timeframe scaffolding on any intraday chart, locking in structural highs/lows, mid/quarter grids, VWAP confluence, and live acceptance/break analytics. It provides a non-repainting overlay that turns range management into a disciplined process.
HOW IT WORKS
- Structure Harvesting – Using , the script samples highs/lows from a user-selected timeframe (default 240 minutes) over a configurable lookback to establish the dominant range.
Pine Script® request.security() - Grid Construction – Midpoint and quarter levels are derived mathematically, mirroring how institutional traders map distribution/accumulation zones.
- Acceptance Detection – Consecutive closes inside the range flip an acceptance flag and darken the cloud, signaling balanced auction conditions.
- Break Confirmation – Multi-bar closes outside the structure raise break labels and alerts, filtering the countless fake-outs that plague breakout traders.
- VWAP Fan Overlay – Session VWAP plus ATR-based bands provide a live measure of flow centering relative to the lattice.
HOW TO USE IT
- Range Plays: Fade taps of the outer rails only when acceptance is active and VWAP sits inside the grid—this is where mean-reversion works best.
- Breakout Plays: Wait for confirmed break labels before entering expansion trades; the dashboard's Width/ATR metric tells you if the expansion has enough fuel.
- Market Prep: Carry the same lattice from pre-market into regular trading hours by keeping the structure timeframe fixed; alerts keep you notified even when managing multiple tickers.
VISUAL FEATURES
- Range Tap and Mid Pivot markers provide a tape-reading breadcrumb trail for journaling.
- Cloud fill opacity tightens when acceptance persists, visually signaling balance compressions ready to break.
- Dashboard displays absolute width, ATR-normalized width, and current state (Balanced vs Transitional) so you can glance across charts quickly.
- Acceptance Flag toggle: Keep the repeated acceptance squares hidden until you need to audit balance.
PARAMETERS
- Structure Timeframe (default: 240): Choose the timeframe whose ranges matter most (4H for indices, Daily for stocks).
- Structure Lookback (default: 60): Bars sampled on the structure timeframe.
- Acceptance Bars (default: 8): How many consecutive bars inside the range confirm balance.
- Break Confirmation Bars (default: 3): Bars required outside the range to validate a breakout.
- ATR Reference (default: 14): ATR period for width normalization.
- Show Midpoint Grid (default: enabled): Display the midpoint and quarter levels.
- Show Adaptive VWAP Fan (default: enabled): Toggle the VWAP channel for assets where volume distribution matters most.
- Show Acceptance Flags (default: disabled): Turn the acceptance markers on/off for maximum visual control.
- Show Range Dashboard (default: enabled): Disable if screen space is limited, re-enable during prep sessions.
ALERTS
The indicator includes five alert conditions:
- Range High Tap: Price interacted with the RangeLattice high
- Range Low Tap: Price interacted with the RangeLattice low
- Range Mid Tap: Price interacted with the RangeLattice mid
- Range Break Up: Confirmed upside breakout
- Range Break Down: Confirmed downside breakout
Where it works best
This indicator works best on liquid instruments with clear structural levels. On very low timeframes (1-minute and below), the structure may update too frequently to be useful. The acceptance/break confirmation system requires patience—faster traders may find the multi-bar confirmation too slow for scalping. The VWAP fan is session-based and resets daily, which may not suit all trading styles.
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
#1 Full Stack AI Trading Community — jackofalltrades.vip| 2025: The Era of AI Trading Mastery📈 AI Automation • AI Trading Bots • Indicators • Strategies • Limitless Potential • Institutional Grade Products • Data Backed Trading • Perfected by Strategy
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。
オープンソーススクリプト
TradingViewの精神に則り、このスクリプトの作者はコードをオープンソースとして公開してくれました。トレーダーが内容を確認・検証できるようにという配慮です。作者に拍手を送りましょう!無料で利用できますが、コードの再公開はハウスルールに従う必要があります。
#1 Full Stack AI Trading Community — jackofalltrades.vip| 2025: The Era of AI Trading Mastery📈 AI Automation • AI Trading Bots • Indicators • Strategies • Limitless Potential • Institutional Grade Products • Data Backed Trading • Perfected by Strategy
免責事項
この情報および投稿は、TradingViewが提供または推奨する金融、投資、トレード、その他のアドバイスや推奨を意図するものではなく、それらを構成するものでもありません。詳細は利用規約をご覧ください。