PROTECTED SOURCE SCRIPT

[Pandora's Chambers] Session Ranges + info by ATTA

39
“Pandora’s Chambers” plots the open–high–low–close range of four major market sessions (US, London, Tokyo, Asia/HKEX) based on Asia/Jerusalem time, then translates them automatically to your chart’s timezone. At each session close it also calculates and displays RSI statistics and volume ratios with optional divergence markers. Future session-open vertical lines can be shown for up to N bars ahead.

⚙️ Key Features
Session Boxes

Draws a colored box around each session’s price range (open–high/low–close).

Box color opacity adapts to session RSI (more opaque when RSI >70 or <30).

RSI Statistics at Close

Calculates for each session:

Average RSI, Min RSI, Max RSI, Standard Deviation.

Up‑volume vs. Down‑volume and their ratio.

Prints these stats in a tiny label above the session high.

Divergence Alerts

Highlights Bearish or Bullish divergence if price and RSI extremes mismatch versus the previous session.

Session Vertical Lines

While a session is active, draws dotted vertical lines at its open & close.

Automatically removed when the session ends.

Future Session Markers

On the last bar, projects vertical lines (and tiny “XX Open” labels) for the next N sessions’ opens.

Helps anticipate upcoming market activity.

🎛️ Inputs & Customization
Input Name Default Description
US Color 🔴 Red Color for US session box & lines
London Color 🔵 Blue Color for London session box & lines
Tokyo Color 🟢 Green Color for Tokyo session box & lines
Asia Color 🟠 Orange Color for Asia/HKEX session box & lines
Tag Text Color ⚪ White Color for all on‑chart labels’ text
Number of Future Bars 50 How many bars ahead to project future open lines
RSI Period 14 Length of the RSI calculation
Higher TF 1/2 “15”, “60” Additional timeframes to sample RSI on each bar

🚀 How to Use
Add to Chart

Open TradingView → Indicators → “Invite-only scripts” or “My Scripts” → select [Pandora’s Chambers] Session Ranges + Info by ATTA.

Set Your Timezone

The script internally uses Asia/Jerusalem to define session times (16:30–23:00 for US, 10:00–18:30 for London, 02:00–08:00 Tokyo, 04:30–11:00 Asia).

TradingView will auto‑convert and display them correctly on your chart’s locale (e.g., New York Time shows US session as 9:30–16:00 ET).

Customize Colors & Bars

Adjust each session’s color to taste, or match your chart theme.

Increase/decrease “Number of Future Bars” to project more or fewer future opens.

Interpret the Labels & Boxes

Session Box: Price range of that session. More opaque when the session RSI is extreme.

Tiny Label at close: displays Avg/Min/Max/Std of RSI, total up/down volume & their ratio.

“Bullish Div” / “Bearish Div” indicates hidden divergence against the previous session.

Future Lines

On the last bar, you’ll see projected “US Open”, “London Open”, etc., up to your future‑bars setting—great for planning entries around upcoming opens.

🔍 Under the Hood (Functions)
f_boxColor(avgRSI, baseColor)
Chooses box transparency: 30 (more visible) when RSI >70 or <30, else 85.

f_std(sumRSI, sumSq, count)
Calculates standard deviation of session RSI values.

timestamp("Asia/Jerusalem", …)
Anchors all session opens/closes to Jerusalem time, then plotted in your chart’s tz.

request.security(..., ta.rsi(...))
Samples RSI on user‑defined higher timeframes for multi‑TF context (not displayed, but can be repurposed).

f_nextTimestamp(_hour, _min) & f_drawFutureLines(_hour, _min, _label)
Compute and draw future open lines and labels every 24h until the “maxFutureBars” limit.

📝 Tips & Best Practices
Combine with Volume Profile to see confluence between session highs/lows and high‑volume nodes.

Overlay with VWAP to gauge fair value inside each session’s box.

Use on multiple symbols and timeframes: this script adapts seamlessly to 5m, 15m, 1h, daily, etc.

Divergence signals work best on 1h+ charts—allow enough bars per session for meaningful RSI swings.

Enjoy clear visibility into each global market session’s rhythm—published by ATTA. If you run into questions or suggest enhancements, drop a comment on the script’s TradingView page!

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。