OPEN-SOURCE SCRIPT
Saptx Trading Time Ranges v2

Saptx – Trading Time Ranges is a session-based market timing indicator designed for traders who focus on specific intraday trading windows rather than constant screen time.
The indicator highlights predefined key trading times using vertical ranges and reference lines, allowing traders to quickly identify when to actively look for trade setups during live trading, backtesting, or TradingView Replay Mode.
Unlike many session indicators, this tool is specifically engineered to work reliably in Replay Mode without auto-scale or zoom distortions.
Once a trading window has ended, its range automatically freezes to the true High and Low of that session, providing clean and stable historical reference levels.
────────────────────
CORE FEATURES
────────────────────
• Session-based trading time ranges
• Automatic High & Low range detection
• Ranges freeze after the session window ends
• Clean and non-intrusive chart visuals
• Replay and backtesting optimized logic
• No auto-scale or zoom distortion issues
────────────────────
SESSION WINDOWS
────────────────────
• Frankfurt Open
• London Open
• MMM1
• MMM2
• New York Open
• New York Trap
• Market Closing
────────────────────
BACKTEST & REPLAY
────────────────────
• Displays previous, current, and next trading day
• Fast navigation to key trading windows in Replay Mode
• Designed for efficient historical trade review
• Stable behavior while scrolling and zooming the chart
────────────────────
CUSTOMIZATION
────────────────────
• Adjustable UTC offset (Winter / Summer time support)
• Custom colors and transparency for ranges and lines
• Clean session labels with optional visibility
• Optional next-session countdown timer
────────────────────
IMPORTANT NOTE
────────────────────
This indicator does NOT generate trade signals.
It is a visual timing and structural tool intended to support discretionary and session-based trading strategies.
────────────────────
RECOMMENDED MARKETS & TIMEFRAMES
────────────────────
• Forex (EUR/USD, GBP/USD, DXY, etc.)
• Intraday timeframes (M5, M15, H1)
The indicator highlights predefined key trading times using vertical ranges and reference lines, allowing traders to quickly identify when to actively look for trade setups during live trading, backtesting, or TradingView Replay Mode.
Unlike many session indicators, this tool is specifically engineered to work reliably in Replay Mode without auto-scale or zoom distortions.
Once a trading window has ended, its range automatically freezes to the true High and Low of that session, providing clean and stable historical reference levels.
────────────────────
CORE FEATURES
────────────────────
• Session-based trading time ranges
• Automatic High & Low range detection
• Ranges freeze after the session window ends
• Clean and non-intrusive chart visuals
• Replay and backtesting optimized logic
• No auto-scale or zoom distortion issues
────────────────────
SESSION WINDOWS
────────────────────
• Frankfurt Open
• London Open
• MMM1
• MMM2
• New York Open
• New York Trap
• Market Closing
────────────────────
BACKTEST & REPLAY
────────────────────
• Displays previous, current, and next trading day
• Fast navigation to key trading windows in Replay Mode
• Designed for efficient historical trade review
• Stable behavior while scrolling and zooming the chart
────────────────────
CUSTOMIZATION
────────────────────
• Adjustable UTC offset (Winter / Summer time support)
• Custom colors and transparency for ranges and lines
• Clean session labels with optional visibility
• Optional next-session countdown timer
────────────────────
IMPORTANT NOTE
────────────────────
This indicator does NOT generate trade signals.
It is a visual timing and structural tool intended to support discretionary and session-based trading strategies.
────────────────────
RECOMMENDED MARKETS & TIMEFRAMES
────────────────────
• Forex (EUR/USD, GBP/USD, DXY, etc.)
• Intraday timeframes (M5, M15, H1)
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.