OPEN-SOURCE SCRIPT
NEXUS Three professional modules. One unified indicator.

🌐 WHAT IS NEXUS?
NEXUS combines three independent professional-grade
modules into a single, clean indicator — eliminating
the need to stack multiple scripts on your chart.
- MODULE 1 — Market Sessions Visualizer
- MODULE 2 — Volume–Price Divergence Detector
- MODULE 3 — Key Levels & Structural Reference Engine
━━━━━━━━━━━━━━━━━━━━━
MODULE 1 — MARKET SESSIONS
━━━━━━━━━━━━━━━━━━━━━
Visualize the four major Forex/Futures trading sessions
with precision and full customization.
★ Sessions covered:
· Tokyo (default: 00:00–09:00 UTC)
· London (default: 07:00–16:00 UTC)
· New York (default: 13:00–22:00 UTC)
· Sydney (default: 21:00–06:00 UTC)
★ Display modes:
· Boxes — classic high/low range boxes
· Zones — colored background highlights
· Timeline — compact bar-level session markers
· Candles — colored candle bodies per session
★ Additional tools:
· Session Open/Close line
· Session 0.5 midpoint level
· Merge overlapping sessions
· Live pip / % change labels
· Weekend exclusion toggle
· Fully customizable colors, borders & label sizes
· Lookback depth control (default: 150 days)
· All session times entered in UTC — no timezone
conflicts regardless of your chart setting
★ Alerts:
Session open · New session high · New session low
━━━━━━━━━━━━━━━━━━━━━
MODULE 2 — VOLUME–PRICE DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━
Identifies moments when volume surges significantly
but price barely moves — a classic footprint of
institutional accumulation or distribution.
★ Two signal types:
· 🔴 DIV (Divergence) — high volume + small price body
→ Strong sign of hidden positioning
· 🟠 SHADOW — high volume + large wick / shadow candle
→ Rejection or absorption signal
★ How it works:
· Compares current volume against a 20-bar SMA
· Volume spike threshold: configurable (default 600%)
· Price change measured via 3 selectable methods:
— Body / Open
— Body / Range
— Range / Open
· Shadow detection with adjustable body-to-wick ratio
★ Visual aids:
· Color-coded volume histogram
(Gray → Yellow → Orange → Red)
· On-chart signal shapes with text labels
· Live info table (top-left):
current volume · volume % change · price % change
body/range ratio · current signal status
★ Alerts:
Volume spike · Shadow candle · Full divergence signal
━━━━━━━━━━━━━━━━━━━━━
MODULE 3 — KEY LEVELS & STRUCTURAL REFERENCE
━━━━━━━━━━━━━━━━━━━━━
A comprehensive reference engine that plots all
critical price levels a professional trader monitors.
★ Session High/Low levels:
· Asia Session (18:00–03:00 ET, configurable)
· London Session (03:00–08:00 ET, configurable)
· New York Session (08:30–17:00 ET, configurable)
→ Lines auto-update in real time
→ Auto-detect and label when a level is broken
★ Market structure levels (ET — NYSE aligned):
· Key time opens: 00:00 · 02:00 · 05:00 · 08:30
09:30 · 10:00 · 14:00 · 15:00 · 16:00 · 17:00
· 4H Open · Daily Open · Weekly Open · Monthly Open
★ Range midpoint levels:
· Previous Day Mid Range (50%)
· Market Open Mid Range (live, updates intraday)
· Weekly Mid Range
· Monthly Mid Range
★ Higher-timeframe levels:
· Previous Day High / Low
· Weekly High / Low
· Monthly High / Low
· All-Time High
★ Pivot calculations (previous day data):
· Standard Pivot Points: PP · R1 · R2 · S1 · S2
· Central Pivot Range (CPR): TC · PP · BC
with CPR width % context label (Trending / Mixed / Range)
★ Smart features:
· Auto-Simplify on HTF — automatically hides granular
levels on higher timeframes to reduce visual noise
· Smart label positioning that adapts to screen view
· Level confluence detection — merges labels when
two levels share the same price
· Vertical day separator lines at 17:00 ET (last 14 days)
· Days-of-week labels at session open
· Extend All Lines toggle
· Global color & text size override
· Full per-level style control (color · style · width)
· Timezone selector for all session calculations
━━━━━━━━━━━━━━━━━━━━━
⚙️ QUICK SETUP GUIDE
━━━━━━━━━━━━━━━━━━━━━
1. Add NEXUS to any intraday chart (1m to 4H recommended)
2. Sessions Module
→ All session times are in UTC by default
→ No need to change your chart timezone
→ Toggle sessions on/off individually
→ Choose your preferred display mode
3. Divergence Module
→ Start with default settings
→ Lower the Volume Threshold (%) on low-liquidity
instruments if signals are too rare
→ Enable "Show Debug Info" for manual calibration
4. Key Levels Module
→ Set your timezone (default: America/New_York)
→ Toggle each level group independently
→ Enable "Auto-Simplify on Higher Timeframes" to keep
the chart clean when zooming out
→ Use "Extend All Lines" for a forward-looking view
━━━━━━━━━━━━━━━━━━━━━
📌 RECOMMENDED TIMEFRAMES
━━━━━━━━━━━━━━━━━━━━━
All modules active → 1m · 3m · 5m · 15m · 30m
Sessions + Levels → 1H · 2H · 4H
Levels only → Daily
⚠️ Sessions module is intraday-only by design.
It will not plot on Daily or higher timeframes.
━━━━━━━━━━━━━━━━━━━━━
📊 COMPATIBLE INSTRUMENTS
━━━━━━━━━━━━━━━━━━━━━
Futures (ES, NQ, MES, MNQ, YM, CL, GC...)
Forex (all major, minor & exotic pairs)
Crypto (BTC, ETH and all altcoins with volume)
Equities (US stocks & ETFs with intraday data)
Indices (SPX, NDX, DXY...)
━━━━━━━━━━━━━━━━━━━━━
📋 RELEASE NOTES
━━━━━━━━━━━━━━━━━━━━━
v1.0 — Initial release
· Full integration of all three modules
· Smart label positioning engine
· Timeframe-aware auto-simplification
· Confluence level merging
· Complete alert system
━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━
This indicator is for informational and educational
purposes only. It does not constitute financial advice.
Past signals do not guarantee future results.
Always manage risk appropriately.
NEXUS combines three independent professional-grade
modules into a single, clean indicator — eliminating
the need to stack multiple scripts on your chart.
- MODULE 1 — Market Sessions Visualizer
- MODULE 2 — Volume–Price Divergence Detector
- MODULE 3 — Key Levels & Structural Reference Engine
━━━━━━━━━━━━━━━━━━━━━
MODULE 1 — MARKET SESSIONS
━━━━━━━━━━━━━━━━━━━━━
Visualize the four major Forex/Futures trading sessions
with precision and full customization.
★ Sessions covered:
· Tokyo (default: 00:00–09:00 UTC)
· London (default: 07:00–16:00 UTC)
· New York (default: 13:00–22:00 UTC)
· Sydney (default: 21:00–06:00 UTC)
★ Display modes:
· Boxes — classic high/low range boxes
· Zones — colored background highlights
· Timeline — compact bar-level session markers
· Candles — colored candle bodies per session
★ Additional tools:
· Session Open/Close line
· Session 0.5 midpoint level
· Merge overlapping sessions
· Live pip / % change labels
· Weekend exclusion toggle
· Fully customizable colors, borders & label sizes
· Lookback depth control (default: 150 days)
· All session times entered in UTC — no timezone
conflicts regardless of your chart setting
★ Alerts:
Session open · New session high · New session low
━━━━━━━━━━━━━━━━━━━━━
MODULE 2 — VOLUME–PRICE DIVERGENCE
━━━━━━━━━━━━━━━━━━━━━
Identifies moments when volume surges significantly
but price barely moves — a classic footprint of
institutional accumulation or distribution.
★ Two signal types:
· 🔴 DIV (Divergence) — high volume + small price body
→ Strong sign of hidden positioning
· 🟠 SHADOW — high volume + large wick / shadow candle
→ Rejection or absorption signal
★ How it works:
· Compares current volume against a 20-bar SMA
· Volume spike threshold: configurable (default 600%)
· Price change measured via 3 selectable methods:
— Body / Open
— Body / Range
— Range / Open
· Shadow detection with adjustable body-to-wick ratio
★ Visual aids:
· Color-coded volume histogram
(Gray → Yellow → Orange → Red)
· On-chart signal shapes with text labels
· Live info table (top-left):
current volume · volume % change · price % change
body/range ratio · current signal status
★ Alerts:
Volume spike · Shadow candle · Full divergence signal
━━━━━━━━━━━━━━━━━━━━━
MODULE 3 — KEY LEVELS & STRUCTURAL REFERENCE
━━━━━━━━━━━━━━━━━━━━━
A comprehensive reference engine that plots all
critical price levels a professional trader monitors.
★ Session High/Low levels:
· Asia Session (18:00–03:00 ET, configurable)
· London Session (03:00–08:00 ET, configurable)
· New York Session (08:30–17:00 ET, configurable)
→ Lines auto-update in real time
→ Auto-detect and label when a level is broken
★ Market structure levels (ET — NYSE aligned):
· Key time opens: 00:00 · 02:00 · 05:00 · 08:30
09:30 · 10:00 · 14:00 · 15:00 · 16:00 · 17:00
· 4H Open · Daily Open · Weekly Open · Monthly Open
★ Range midpoint levels:
· Previous Day Mid Range (50%)
· Market Open Mid Range (live, updates intraday)
· Weekly Mid Range
· Monthly Mid Range
★ Higher-timeframe levels:
· Previous Day High / Low
· Weekly High / Low
· Monthly High / Low
· All-Time High
★ Pivot calculations (previous day data):
· Standard Pivot Points: PP · R1 · R2 · S1 · S2
· Central Pivot Range (CPR): TC · PP · BC
with CPR width % context label (Trending / Mixed / Range)
★ Smart features:
· Auto-Simplify on HTF — automatically hides granular
levels on higher timeframes to reduce visual noise
· Smart label positioning that adapts to screen view
· Level confluence detection — merges labels when
two levels share the same price
· Vertical day separator lines at 17:00 ET (last 14 days)
· Days-of-week labels at session open
· Extend All Lines toggle
· Global color & text size override
· Full per-level style control (color · style · width)
· Timezone selector for all session calculations
━━━━━━━━━━━━━━━━━━━━━
⚙️ QUICK SETUP GUIDE
━━━━━━━━━━━━━━━━━━━━━
1. Add NEXUS to any intraday chart (1m to 4H recommended)
2. Sessions Module
→ All session times are in UTC by default
→ No need to change your chart timezone
→ Toggle sessions on/off individually
→ Choose your preferred display mode
3. Divergence Module
→ Start with default settings
→ Lower the Volume Threshold (%) on low-liquidity
instruments if signals are too rare
→ Enable "Show Debug Info" for manual calibration
4. Key Levels Module
→ Set your timezone (default: America/New_York)
→ Toggle each level group independently
→ Enable "Auto-Simplify on Higher Timeframes" to keep
the chart clean when zooming out
→ Use "Extend All Lines" for a forward-looking view
━━━━━━━━━━━━━━━━━━━━━
📌 RECOMMENDED TIMEFRAMES
━━━━━━━━━━━━━━━━━━━━━
All modules active → 1m · 3m · 5m · 15m · 30m
Sessions + Levels → 1H · 2H · 4H
Levels only → Daily
⚠️ Sessions module is intraday-only by design.
It will not plot on Daily or higher timeframes.
━━━━━━━━━━━━━━━━━━━━━
📊 COMPATIBLE INSTRUMENTS
━━━━━━━━━━━━━━━━━━━━━
Futures (ES, NQ, MES, MNQ, YM, CL, GC...)
Forex (all major, minor & exotic pairs)
Crypto (BTC, ETH and all altcoins with volume)
Equities (US stocks & ETFs with intraday data)
Indices (SPX, NDX, DXY...)
━━━━━━━━━━━━━━━━━━━━━
📋 RELEASE NOTES
━━━━━━━━━━━━━━━━━━━━━
v1.0 — Initial release
· Full integration of all three modules
· Smart label positioning engine
· Timeframe-aware auto-simplification
· Confluence level merging
· Complete alert system
━━━━━━━━━━━━━━━━━━━━━
⚠️ DISCLAIMER
━━━━━━━━━━━━━━━━━━━━━
This indicator is for informational and educational
purposes only. It does not constitute financial advice.
Past signals do not guarantee future results.
Always manage risk appropriately.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.