OPEN-SOURCE SCRIPT
已更新 Session Intelligence Architecture [Microstructure]

SESSION INTELLIGENCE ARCHITECTURE [Microstructure]
An institutional-grade session & market-structure overlay for crypto.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IT DOES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crypto trades 24/7, but it "breathes" in three waves — Asia, Europe and the US.
Each session has its own character. This indicator marks those sessions directly on
your chart and translates institutional metrics into clear, jargon-free signals.
It answers three questions at a glance:
• Who is in control right now — buyers or sellers?
• Is a move real, or just a liquidity trap?
• Which session is actually driving the market today?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ON-CHART VISUALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Session Boxes — a live, growing rectangle clamped to each session's high & low
(yellow = Asia, blue = Europe, red = US). The active box border turns SOLID & thicker
when a strong, volume-backed move is underway, and DASHED when the market is quiet.
• Session VWAP — an anchored fair-value line per session that fades out after close.
• Open / Equilibrium Line — a dotted line at each session's opening price.
• Sweep & Breakout Markers — ✕ for liquidity sweeps (stop hunts), ▲/▼ triangles for
genuine structural breakouts of the Asia range.
• Focus Mode — gently dims the gaps between sessions so the active session pops.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE ENGINE (why it's different)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• ATR-NORMALIZED, not static %. A move is only flagged as a "Significant Expansion"
when |Close − Open| exceeds a multiple of the current ATR(14). This adapts to
volatility instead of using a fixed, one-size-fits-all percentage.
• SESSION-SPECIFIC RVOL. Each session's cumulative volume is compared against the
average of the last 10 SAME-type sessions (Asia vs Asia, US vs US). Above the
threshold = institutional drive; below = suspect.
• LIQUIDITY SWEEP vs. BREAKOUT. A wick beyond the Asia high/low that closes back
inside is tagged as a trap. A close outside with an expansion body (≥60% of range)
is tagged as a real breakout.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE DASHBOARD (bottom-center)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
One row per session, read left to right:
• SESSION — name + status (🟢 Active / ⚪ Inactive)
• MARKET STATE — plain language, color-coded:
🚀 Buyer Dominance (Strong) — expansion up + valid volume
🩸 Seller Dominance (Strong) — expansion down + valid volume
⚠️ Weak Trend (Trap) — expansion without volume (fake-move protection)
💤 Market Asleep / Accumulation — price still inside the ATR threshold
• PRICE & MOVE — session range + net % change
• RVOL — a 5-block progress bar (████░) with the raw ratio, e.g. (1.45x)
• ORDERFLOW — Bullish ▲ / Bearish ▼ based on price vs. session VWAP
Plus a merged bottom row: today's dominant session by combined volume & expansion.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• "Breakout detected" — fires once per bar close (confirmed, no repaint).
• "Liquidity Sweep detected" — fires once per bar (sweeps often form intrabar).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
① Sessions — timezone + the three session windows + historical lookback (days)
② Engine — ATR length & multiplier, RVOL lookback & threshold
③ Market Structure — breakout body ratio, toggle sweeps/breakouts
④ Visualization — colors, line widths, box fill color & saturation,
VWAP fade-out, Focus Mode + dim color, and on/off toggles for every element
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best on intraday timeframes (5m–1h), where sessions are most meaningful. Watch the
dashboard for the current regime, use the Asia range + sweep/breakout markers for
structure, and the VWAP/orderflow bias to gauge who has the upper hand.
This script is an analysis tool, not financial advice. Always do your own research
and manage risk. Past behavior does not guarantee future results.
An institutional-grade session & market-structure overlay for crypto.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
WHAT IT DOES
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Crypto trades 24/7, but it "breathes" in three waves — Asia, Europe and the US.
Each session has its own character. This indicator marks those sessions directly on
your chart and translates institutional metrics into clear, jargon-free signals.
It answers three questions at a glance:
• Who is in control right now — buyers or sellers?
• Is a move real, or just a liquidity trap?
• Which session is actually driving the market today?
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ON-CHART VISUALS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• Session Boxes — a live, growing rectangle clamped to each session's high & low
(yellow = Asia, blue = Europe, red = US). The active box border turns SOLID & thicker
when a strong, volume-backed move is underway, and DASHED when the market is quiet.
• Session VWAP — an anchored fair-value line per session that fades out after close.
• Open / Equilibrium Line — a dotted line at each session's opening price.
• Sweep & Breakout Markers — ✕ for liquidity sweeps (stop hunts), ▲/▼ triangles for
genuine structural breakouts of the Asia range.
• Focus Mode — gently dims the gaps between sessions so the active session pops.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE ENGINE (why it's different)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• ATR-NORMALIZED, not static %. A move is only flagged as a "Significant Expansion"
when |Close − Open| exceeds a multiple of the current ATR(14). This adapts to
volatility instead of using a fixed, one-size-fits-all percentage.
• SESSION-SPECIFIC RVOL. Each session's cumulative volume is compared against the
average of the last 10 SAME-type sessions (Asia vs Asia, US vs US). Above the
threshold = institutional drive; below = suspect.
• LIQUIDITY SWEEP vs. BREAKOUT. A wick beyond the Asia high/low that closes back
inside is tagged as a trap. A close outside with an expansion body (≥60% of range)
is tagged as a real breakout.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
THE DASHBOARD (bottom-center)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
One row per session, read left to right:
• SESSION — name + status (🟢 Active / ⚪ Inactive)
• MARKET STATE — plain language, color-coded:
🚀 Buyer Dominance (Strong) — expansion up + valid volume
🩸 Seller Dominance (Strong) — expansion down + valid volume
⚠️ Weak Trend (Trap) — expansion without volume (fake-move protection)
💤 Market Asleep / Accumulation — price still inside the ATR threshold
• PRICE & MOVE — session range + net % change
• RVOL — a 5-block progress bar (████░) with the raw ratio, e.g. (1.45x)
• ORDERFLOW — Bullish ▲ / Bearish ▼ based on price vs. session VWAP
Plus a merged bottom row: today's dominant session by combined volume & expansion.
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
ALERTS
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
• "Breakout detected" — fires once per bar close (confirmed, no repaint).
• "Liquidity Sweep detected" — fires once per bar (sweeps often form intrabar).
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
SETTINGS OVERVIEW
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
① Sessions — timezone + the three session windows + historical lookback (days)
② Engine — ATR length & multiplier, RVOL lookback & threshold
③ Market Structure — breakout body ratio, toggle sweeps/breakouts
④ Visualization — colors, line widths, box fill color & saturation,
VWAP fade-out, Focus Mode + dim color, and on/off toggles for every element
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
HOW TO USE
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Best on intraday timeframes (5m–1h), where sessions are most meaningful. Watch the
dashboard for the current regime, use the Asia range + sweep/breakout markers for
structure, and the VWAP/orderflow bias to gauge who has the upper hand.
This script is an analysis tool, not financial advice. Always do your own research
and manage risk. Past behavior does not guarantee future results.
發行說明
v1.1 — "Who's Trading Now?" Participant Intelligence____________________________________________________
• New bottom-right box estimating the dominant market participant — Institutional,
Smart Money, Retail or Market Maker — via a normalized volume × displacement model.
• Refined with Volume Delta one-sidedness, liquidity-sweep & delta-divergence
(absorption), VWAP-pinning and volatility compression, plus directionless chop.
• Headline verdict + confidence %, and a 4-row intensity breakdown (shares sum to 100%).
• New alert: "Dominant flow shifted" on participant change (bar close).
• Configurable rolling window, Volume-Delta lower timeframe (auto/manual), box
position and colors. Non-repainting, with graceful fallback when intrabar data
is unavailable. Honest, clearly-labelled estimate — no participant data is faked.
發行說明
v1.2 — "Spot vs Futures" Cross-Market Flow_______________________________________
• New bottom-left box reading REAL cross-market data: it pulls the matching spot AND
futures (perp) symbol via request.security and shows whether spot or futures buyers
are currently more aggressive.
• Signals: basis / premium (perp price vs spot price = leveraged buy demand), the
taker buy-delta differential (who is lifting which book harder), and volume share.
• Verdict — FUTURES-LED / SPOT-LED / BALANCED + dominant share %, with Spot/Futures
intensity bars, the live basis (premium/discount %) and the futures volume share.
• Symbols auto-derive from the chart (strip/append ".P") with manual override inputs
for other exchanges; configurable smoothing window, lower-TF and basis/delta weight.
• Robust by design: ignore_invalid_symbol means a wrong pair shows "n/a" instead of
erroring; graceful candle-sign fallback when intrabar data is unavailable. Non-repainting.
• New alert: "Spot/Futures flow" when the regime flips (bar close).
發行說明
More Style settings發行說明
Designupdate 發行說明
Added : Daily Open, Session Label.. 發行說明
Designupdate發行說明
Lables, Better UI開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。
開源腳本
秉持TradingView一貫精神,這個腳本的創作者將其設為開源,以便交易者檢視並驗證其功能。向作者致敬!您可以免費使用此腳本,但請注意,重新發佈代碼需遵守我們的社群規範。
免責聲明
這些資訊和出版物並非旨在提供,也不構成TradingView提供或認可的任何形式的財務、投資、交易或其他類型的建議或推薦。請閱讀使用條款以了解更多資訊。