OPEN-SOURCE SCRIPT
מעודכן

AI Market Open - Live Session Tracker (PDH/PDL/ONH/ONL)

77
🤖 AI MARKET OPEN - LIVE SESSION TRACKER

A comprehensive real-time tracking system designed for intraday traders who trade the market open using previous day levels (PDH/PDL) and overnight session ranges (ONH/ONL). This indicator provides intelligent context and mitigation tracking to help you make informed trading decisions during the critical morning session.

═══════════════════════════════════════════════════════════════

📊 WHAT THIS INDICATOR DOES

This indicator automatically tracks and displays six critical price levels:

• PDH (Previous Day High) - Yesterday's regular session high (9:30 AM - 4:00 PM ET)
• PDL (Previous Day Low) - Yesterday's regular session low
• PDC (Previous Day Close) - Yesterday's 3:59 PM ET close price
• ONH (Overnight High) - Overnight session high (6:00 PM - 9:29 AM ET)
• ONL (Overnight Low) - Overnight session low
• 9:30 Open - The exact opening price at market open

It monitors whether each level has been "mitigated" (touched/tested) in real-time and provides AI-generated context about current market structure.

═══════════════════════════════════════════════════════════════

🎯 KEY FEATURES

✅ REAL-TIME MITIGATION TRACKING
• Live status updates showing ✅ (mitigated) or ⏳ (unmitigated) for each level
• Persistent tracking - once a level is touched, it stays marked
• Gap fill detection with 🌕 (filled) or 🌒 (open) status

✅ DYNAMIC CALCULATIONS
• Δ Open: Distance from 9:30 AM opening price to each level
• RT Δ: Real-time distance from current price to each level
• Automatic color coding (green for resistance, red for support)

✅ AI MARKET CONTEXT SUMMARY
The indicator generates intelligent commentary based on:
• Gap size classification (large/moderate/small)
• PDH/PDL mitigation status
• Current position within overnight range
• Directional bias and key levels to watch

✅ CUSTOMIZABLE DISPLAY
• Choose table position (9 locations available)
• Adjustable text size (tiny/small/normal/large)
• Custom colors for headers, summary text, and background
• Show/hide table with single toggle

✅ PROFESSIONAL LEVEL LINES
• Ray-style horizontal lines extending right
• Customizable line width (1-4)
• Three line styles: Solid, Dashed, Dotted
• Color-coded labels with exact price values
• Lines auto-update and reset each session

═══════════════════════════════════════════════════════════════

🔧 HOW IT WORKS

SESSION TRACKING
• Regular Session: 9:30 AM - 4:00 PM ET (for PDH/PDL calculation)
• Close Capture: 3:59 PM ET close becomes PDC
• Overnight Session: 6:00 PM - 9:29 AM ET (for ONH/ONL)
• Session Reset: 6:00 PM ET daily

MITIGATION LOGIC
A level is considered "mitigated" when price touches or crosses it:
• PDH mitigated: High >= PDH at any point after 6:00 PM previous day
• PDL mitigated: Low <= PDL at any point after 6:00 PM previous day
• ONH mitigated: High >= ONH after 9:30 AM open
• ONL mitigated: Low <= ONL after 9:30 AM open
• Gap filled: Price crosses PDC after gapping up or down

AI SUMMARY ALGORITHM
The indicator analyzes three key dimensions:

1. GAP CLASSIFICATION
• Large gap (>50 pts): Suggests gap-fill or extension scenarios
• Moderate gap (20-50 pts): Monitor overnight levels for direction
• Small gap (<20 pts): Range-bound expectation

2. PDH/PDL STATUS
• Both untested: Clean liquidity zones
• One mitigated: Remaining level becomes primary target
• Both mitigated: Expect range/balance trade

3. OVERNIGHT RANGE POSITION
• Top 25%: Bullish bias, watch PDH
• Mid-upper: Slight bull bias
• Mid-lower: Neutral
• Bottom 25%: Vulnerable to PDL sweep

═══════════════════════════════════════════════════════════════

📖 HOW TO USE

STEP 1: ADD TO CHART
• Apply to any intraday timeframe (1m, 5m, 15m recommended)
• Works on ES, NQ, YM, RTY, and other CME futures
• Can be used on stocks and forex (adjust session times accordingly)

STEP 2: SET YOUR TIMEZONE
• Default: America/New_York (Eastern Time)
• Also supports: Chicago, Los Angeles, Phoenix
• Ensure your chart timezone matches your selection

STEP 3: CUSTOMIZE APPEARANCE
• Position table where it doesn't block your chart action
• Adjust text size based on screen resolution
• Customize colors to match your chart theme
• Toggle line styles for visual preference

STEP 4: INTERPRET THE DATA
• Before market open (pre-9:30 AM): Review gap size and overnight levels
• At market open: Check which levels are closest to price
• During session: Monitor mitigation status and RT Δ values
• Read AI summary for contextual bias and key scenarios

STEP 5: APPLY TO YOUR STRATEGY
• Use unmitigated levels as potential targets
• Watch for reactions when price approaches key levels
• Gap-fill setups: Trade reversions when gap is open
• Breakout setups: Trade continuations when levels get mitigated

═══════════════════════════════════════════════════════════════

⚙️ INDICATOR SETTINGS

DISPLAY SETTINGS
• Timezone: Select your local market timezone
• Table Position: 9 locations (corners, edges, center)
• Text Size: tiny | small | normal | large
• Show Summary Table: Toggle on/off

COLOR CUSTOMIZATION
• Header Text Color: Default white
• AI Summary Color: Default aqua
• Background Color: Default semi-transparent black
• Border Color: Default blue

LINE CUSTOMIZATION (PDH)
• Line Width: 1-4 pixels
• Line Style: Solid | Dashed | Dotted
• Color: Default red with 40% transparency

LINE CUSTOMIZATION (PDL)
• Line Width: 1-4 pixels
• Line Style: Solid | Dashed | Dotted
• Color: Default green with 40% transparency

LINE CUSTOMIZATION (PDC)
• Line Width: 1-4 pixels
• Line Style: Solid | Dashed | Dotted
• Color: Default yellow with 60% transparency

LINE CUSTOMIZATION (ONH)
• Line Width: 1-4 pixels
• Line Style: Solid | Dashed | Dotted
• Color: Default orange with 50% transparency

LINE CUSTOMIZATION (ONL)
• Line Width: 1-4 pixels
• Line Style: Solid | Dashed | Dotted
• Color: Default blue with 50% transparency

LINE CUSTOMIZATION (9:30 Open)
• Line Width: 1-4 pixels
• Line Style: Solid | Dashed | Dotted
• Color: Default white with 50% transparency

═══════════════════════════════════════════════════════════════

💡 BEST PRACTICES

✓ Use on 1-minute or 5-minute charts for precise level tracking
✓ Combine with volume profile for confluence
✓ Wait for confirmation candles near key levels
✓ Pay attention to gap-fill probability (larger gaps more likely to fill)
✓ Use RT Δ values to gauge distance and set realistic targets
✓ Review AI summary each morning for bias and scenario planning
✓ Don't trade blindly - use levels as reference points, not mechanical signals

═══════════════════════════════════════════════════════════════

⚠️ IMPORTANT NOTES

• This indicator is designed for CME session times (futures markets)
• For stocks, session times may differ - adjust expectations accordingly
• Levels reset daily at 6:00 PM ET - no weekend carryover
• Mitigation tracking persists throughout the session
• The AI summary provides context, not trade signals
• Always use proper risk management

═══════════════════════════════════════════════════════════════

📌 IDEAL FOR

• Day traders focusing on market open
• Scalpers using previous day levels
• Session-based traders (Asia/London/NY)
• Traders who need automated level tracking
• Anyone trading overnight gaps and ranges

═══════════════════════════════════════════════════════════════

🔄 VERSION HISTORY

v1.0 - Initial Release
• Core tracking system for PDH/PDL/PDC/ONH/ONL/Open
• Real-time mitigation status
• AI context summary
• Fully customizable display and lines
• Multi-timezone support

═══════════════════════════════════════════════════════════════

📧 FEEDBACK & SUPPORT

If you find this indicator helpful, please:
• Leave a like 👍
• Add to favorites ⭐
• Share with fellow traders
• Comment with suggestions or questions

Happy trading! 📈

═══════════════════════════════════════════════════════════════
הערות שחרור
space issue updated
הערות שחרור
minor change to improve visual

כתב ויתור

המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.