OPEN-SOURCE SCRIPT
تم تحديثه MRG Session High/Low

MRG Session High/Low - Indicator Description
📊 Overview
This Pine Script indicator automatically displays key levels from Asian and London trading sessions on your TradingView chart. It plots the high and low points of each completed session, allowing you to quickly identify important support and resistance zones for your trades.
🎯 Key Features
Detected Sessions (New York Timezone)
Asian Session: 18:00 - 03:00 (6pm - 3am)
London Session: 03:00 - 09:00 (3am - 9.30am)
Plotted Levels
Session High: The highest point reached during the session
Session Low: The lowest point reached during the session
Start Lines: Vertical dashed lines marking the beginning of each session (optional)
⚙️ Customizable Settings
Display Options
✅ Show/hide Asian Session
✅ Show/hide London Session
✅ Show/hide session start lines
Style Options
🎨 Asian Color: Orange by default
🎨 London Color: Blue by default
🎨 Start lines color: Red by default
📏 Line thickness: Adjustable from 1 to 5
🔍 How It Works
Automatic Detection: The indicator automatically detects when a new session begins
Level Calculation: During each session, it continuously records highs and lows
Line Plotting: At the end of each session, it draws two horizontal lines:
One line at the session high level
One line at the session low level
Extension: Lines extend to the right for easy future identification
📈 Strategic Usage
For Breakout Trading
Trade breakouts of Asian and London session highs/lows
Breakouts from these levels often signal the beginning of significant moves
For Support and Resistance
Use these levels as key support and resistance zones
Prices often come back to test these levels during the New York session
For Multi-Timeframe Analysis
Identify consolidation during Asian/London sessions
Anticipate volatility at New York open
💡 Advantages
✨ Clear and automatic visualization of session levels
⏱️ Time-saving: no need to manually draw levels
🎯 Precise levels based on actual highs/lows of each session
🔄 Automatically updates daily
📱 Compatible with all timeframes (recommended: M5, M15, H1)
🎓 Ideal For
Forex traders (especially XAUUSD, EUR/USD, GBP/USD)
Scalpers and day traders
Session breakout strategies
Trading around New York open
Liquidity zone analysis
📌 Important Note
The indicator uses New York timezone (America/New_York) to ensure session time accuracy, regardless of your local timezone.
📊 Overview
This Pine Script indicator automatically displays key levels from Asian and London trading sessions on your TradingView chart. It plots the high and low points of each completed session, allowing you to quickly identify important support and resistance zones for your trades.
🎯 Key Features
Detected Sessions (New York Timezone)
Asian Session: 18:00 - 03:00 (6pm - 3am)
London Session: 03:00 - 09:00 (3am - 9.30am)
Plotted Levels
Session High: The highest point reached during the session
Session Low: The lowest point reached during the session
Start Lines: Vertical dashed lines marking the beginning of each session (optional)
⚙️ Customizable Settings
Display Options
✅ Show/hide Asian Session
✅ Show/hide London Session
✅ Show/hide session start lines
Style Options
🎨 Asian Color: Orange by default
🎨 London Color: Blue by default
🎨 Start lines color: Red by default
📏 Line thickness: Adjustable from 1 to 5
🔍 How It Works
Automatic Detection: The indicator automatically detects when a new session begins
Level Calculation: During each session, it continuously records highs and lows
Line Plotting: At the end of each session, it draws two horizontal lines:
One line at the session high level
One line at the session low level
Extension: Lines extend to the right for easy future identification
📈 Strategic Usage
For Breakout Trading
Trade breakouts of Asian and London session highs/lows
Breakouts from these levels often signal the beginning of significant moves
For Support and Resistance
Use these levels as key support and resistance zones
Prices often come back to test these levels during the New York session
For Multi-Timeframe Analysis
Identify consolidation during Asian/London sessions
Anticipate volatility at New York open
💡 Advantages
✨ Clear and automatic visualization of session levels
⏱️ Time-saving: no need to manually draw levels
🎯 Precise levels based on actual highs/lows of each session
🔄 Automatically updates daily
📱 Compatible with all timeframes (recommended: M5, M15, H1)
🎓 Ideal For
Forex traders (especially XAUUSD, EUR/USD, GBP/USD)
Scalpers and day traders
Session breakout strategies
Trading around New York open
Liquidity zone analysis
📌 Important Note
The indicator uses New York timezone (America/New_York) to ensure session time accuracy, regardless of your local timezone.
ملاحظات الأخبار
MRG Session High/Low - Indicator Description📊 Overview
This Pine Script indicator automatically displays key levels from Asian and London trading sessions on your TradingView chart. It plots the high and low points of each completed session, allowing you to quickly identify important support and resistance zones for your trades.
🎯 Key Features
Detected Sessions (New York Timezone)
Asian Session: 18:00 - 03:00 (6pm - 3am)
London Session: 03:00 - 09:00 (3am - 9.30am)
Plotted Levels
Session High: The highest point reached during the session
Session Low: The lowest point reached during the session
Start Lines: Vertical dashed lines marking the beginning of each session (optional)
⚙️ Customizable Settings
Display Options
✅ Show/hide Asian Session
✅ Show/hide London Session
✅ Show/hide session start lines
Style Options
🎨 Asian Color: Orange by default
🎨 London Color: Blue by default
🎨 Start lines color: Red by default
📏 Line thickness: Adjustable from 1 to 5
🔍 How It Works
Automatic Detection: The indicator automatically detects when a new session begins
Level Calculation: During each session, it continuously records highs and lows
Line Plotting: At the end of each session, it draws two horizontal lines:
One line at the session high level
One line at the session low level
Extension: Lines extend to the right for easy future identification
📈 Strategic Usage
For Breakout Trading
Trade breakouts of Asian and London session highs/lows
Breakouts from these levels often signal the beginning of significant moves
For Support and Resistance
Use these levels as key support and resistance zones
Prices often come back to test these levels during the New York session
For Multi-Timeframe Analysis
Identify consolidation during Asian/London sessions
Anticipate volatility at New York open
💡 Advantages
✨ Clear and automatic visualization of session levels
⏱️ Time-saving: no need to manually draw levels
🎯 Precise levels based on actual highs/lows of each session
🔄 Automatically updates daily
📱 Compatible with all timeframes (recommended: M5, M15, H1)
🎓 Ideal For
Forex traders (especially XAUUSD, EUR/USD, GBP/USD)
Scalpers and day traders
Session breakout strategies
Trading around New York open
Liquidity zone analysis
📌 Important Note
The indicator uses New York timezone (America/New_York) to ensure session time accuracy, regardless of your local timezone.
ملاحظات الأخبار
MRG Session High/Low - Indicator Description📊 Overview
This Pine Script indicator automatically displays key levels from Asian and London trading sessions on your TradingView chart. It plots the high and low points of each completed session, allowing you to quickly identify important support and resistance zones for your trades.
🎯 Key Features
Detected Sessions (New York Timezone)
Asian Session: 18:00 - 03:00 (6pm - 3am)
London Session: 03:00 - 09:00 (3am - 9.30am)
Plotted Levels
Session High: The highest point reached during the session
Session Low: The lowest point reached during the session
Start Lines: Vertical dashed lines marking the beginning of each session (optional)
⚙️ Customizable Settings
Display Options
✅ Show/hide Asian Session
✅ Show/hide London Session
✅ Show/hide session start lines
Style Options
🎨 Asian Color: Orange by default
🎨 London Color: Blue by default
🎨 Start lines color: Red by default
📏 Line thickness: Adjustable from 1 to 5
🔍 How It Works
Automatic Detection: The indicator automatically detects when a new session begins
Level Calculation: During each session, it continuously records highs and lows
Line Plotting: At the end of each session, it draws two horizontal lines:
One line at the session high level
One line at the session low level
Extension: Lines extend to the right for easy future identification
📈 Strategic Usage
For Breakout Trading
Trade breakouts of Asian and London session highs/lows
Breakouts from these levels often signal the beginning of significant moves
For Support and Resistance
Use these levels as key support and resistance zones
Prices often come back to test these levels during the New York session
For Multi-Timeframe Analysis
Identify consolidation during Asian/London sessions
Anticipate volatility at New York open
💡 Advantages
✨ Clear and automatic visualization of session levels
⏱️ Time-saving: no need to manually draw levels
🎯 Precise levels based on actual highs/lows of each session
🔄 Automatically updates daily
📱 Compatible with all timeframes (recommended: M5, M15, H1)
🎓 Ideal For
Forex traders (especially XAUUSD, EUR/USD, GBP/USD)
Scalpers and day traders
Session breakout strategies
Trading around New York open
Liquidity zone analysis
📌 Important Note
The indicator uses New York timezone (America/New_York) to ensure session time accuracy, regardless of your local timezone.
ملاحظات الأخبار
📖 FULL DESCRIPTION IN ENGLISHMRG Session High/Low - Professional Trading Sessions Indicator
The ultimate indicator to identify and visualize key levels of major trading sessions with full customization.
🎯 Main Features
📊 Session Visualization
Asian Session (default: 18:00 - 03:00 NY time)
High and Low of the session in orange
Vertical session start line
London Session (default: 03:00 - 09:30 NY time)
High and Low of the session in blue
Vertical session start line
New York Session (default: 09:30+ NY time)
Vertical session start line
Marks the end of London session
🌍 Multi-Timezone Support
Dropdown menu with 12 major timezones:
America: New York, Chicago, Los Angeles
Europe: London, Paris, Berlin
Asia: Tokyo, Shanghai, Hong Kong, Singapore
Pacific: Sydney, Auckland
⚙️ Full Customization
Flexible Schedule:
Set your own session times
Adapt the indicator to your trading strategy
Compatible with all timezones
Line Styles:
Choose between Solid, Dashed or Dotted for each line type
Adjust thickness from 1 to 5
Customizable Colors:
Asian Session (default: Orange)
London Session (default: Blue)
Session start lines (default: Red)
Daily Open line (default: White)
🔄 Smart Operation
Advance Placement: All session vertical lines appear at the start of Asian session for optimal reference
Automatic Cleanup: Previous day's levels are automatically deleted at 18:00 (or your custom Asian start time)
Automatic Adaptation: Works on all timeframes (1m, 5m, 15m, 1h, etc.)
📍 Visual Markers
3 session lines: Asian, London, New York
1 Daily Open line: Marks the start of your trading day
Session High/Low: Horizontal levels extended to the right
💡 Recommended Use
Perfect for:
✅ Day traders on FOREX and precious metals (XAUUSD)
✅ Scalpers looking for key session levels
✅ Breakout traders on sessions
✅ Strategies based on institutional trading hours
🎓 Perfect for All Levels
Beginners: Default configuration optimized for NY timezone
Advanced: Full customization for your unique strategy
Professionals: Accurate and reliable visualization tools
📋 PATCH NOTES - MRG Session High/Low v2.0
🐛 Bug Fixes
✅ Line Thickness Correction: The "Line thickness" parameter now correctly applies to ALL lines, including the Daily Open line
✨ New Features
🌍 Customizable Timezone (Dropdown Menu)
Easy selection of your timezone via dropdown menu
12 available timezones:
America: New York, Chicago, Los Angeles
Europe: London, Paris, Berlin
Asia: Tokyo, Shanghai, Hong Kong, Singapore
Pacific: Sydney, Auckland
⏰ 100% Customizable Session Times
Asian Session Start: Choose start time (default: 18:00)
London Session Start: Choose start time (default: 03:00)
New York Session Start: Choose start time (default: 09:30)
Daily Open Time: Define your trading day start (default: 00:00)
📍 Vertical Reference Lines
Advance Placement: All session lines appear at the start of Asian session
3 session lines: Asian, London, New York (red by default, customizable)
1 Daily Open line: Marks the day start (white by default, customizable)
Automatic Cleanup: All old lines are deleted at the start of each new Asian session
🎨 Complete Line Style Customization
4 customizable line types:
Asian High/Low Lines (Solid/Dashed/Dotted)
London High/Low Lines (Solid/Dashed/Dotted)
Session Start Lines (Solid/Dashed/Dotted)
Daily Open Line (Solid/Dashed/Dotted)
Line Thickness: Adjustable width from 1 to 5
🎨 Customizable Colors
Asian Color (default: Orange)
London Color (default: Blue)
Session Start Lines Color (default: Red)
Daily Open Line Color (default: White)
⚡ Optimizations
Automatic timeframe detection (works on all TF)
Accurate line position calculation based on timeframe
Optimized memory management with old line deletion
Version 2.0 - January 2025
By MRG Trading
ملاحظات الأخبار
📖 FULL DESCRIPTIONMRG Session High/Low - Professional Trading Sessions Indicator
The ultimate indicator to identify and visualize key levels of major trading sessions with full customization.
🎯 Main Features
📊 Session Visualization
Asian Session (default: 18:00 - 03:00 NY time)
High and Low of the session in orange
Vertical session start line
London Session (default: 03:00 - 09:30 NY time)
High and Low of the session in blue
Vertical session start line
New York Session (default: 09:30+ NY time)
Vertical session start line
Marks the end of London session
🌍 Multi-Timezone Support
Dropdown menu with 12 major timezones:
America: New York, Chicago, Los Angeles
Europe: London, Paris, Berlin
Asia: Tokyo, Shanghai, Hong Kong, Singapore
Pacific: Sydney, Auckland
⚙️ Full Customization
Flexible Schedule:
Set your own session times
Adapt the indicator to your trading strategy
Compatible with all timezones
Line Styles:
Choose between Solid, Dashed or Dotted for each line type
Adjust thickness from 1 to 5
Customizable Colors:
Asian Session (default: Orange)
London Session (default: Blue)
Session start lines (default: Red)
Daily Open line (default: White)
🔄 Smart Operation
Advance Placement: All session vertical lines appear at the start of Asian session for optimal reference
Automatic Cleanup: Previous day's levels are automatically deleted at 18:00 (or your custom Asian start time)
Automatic Adaptation: Works on all timeframes (1m, 5m, 15m, 1h, etc.)
📍 Visual Markers
3 session lines: Asian, London, New York
1 Daily Open line: Marks the start of your trading day
Session High/Low: Horizontal levels extended to the right
💡 Recommended Use
Perfect for:
✅ Day traders on FOREX and precious metals (XAUUSD)
✅ Scalpers looking for key session levels
✅ Breakout traders on sessions
✅ Strategies based on institutional trading hours
🎓 Perfect for All Levels
Beginners: Default configuration optimized for NY timezone
Advanced: Full customization for your unique strategy
Professionals: Accurate and reliable visualization tools
📋 PATCH NOTES - MRG Session High/Low v2.0
🐛 Bug Fixes
✅ Line Thickness Correction: The "Line thickness" parameter now correctly applies to ALL lines, including the Daily Open line
✨ New Features
🌍 Customizable Timezone (Dropdown Menu)
Easy selection of your timezone via dropdown menu
12 available timezones:
America: New York, Chicago, Los Angeles
Europe: London, Paris, Berlin
Asia: Tokyo, Shanghai, Hong Kong, Singapore
Pacific: Sydney, Auckland
⏰ 100% Customizable Session Times
Asian Session Start: Choose start time (default: 18:00)
London Session Start: Choose start time (default: 03:00)
New York Session Start: Choose start time (default: 09:30)
Daily Open Time: Define your trading day start (default: 00:00)
📍 Vertical Reference Lines
Advance Placement: All session lines appear at the start of Asian session
3 session lines: Asian, London, New York (red by default, customizable)
1 Daily Open line: Marks the day start (white by default, customizable)
Automatic Cleanup: All old lines are deleted at the start of each new Asian session
🎨 Complete Line Style Customization
4 customizable line types:
Asian High/Low Lines (Solid/Dashed/Dotted)
London High/Low Lines (Solid/Dashed/Dotted)
Session Start Lines (Solid/Dashed/Dotted)
Daily Open Line (Solid/Dashed/Dotted)
Line Thickness: Adjustable width from 1 to 5
🎨 Customizable Colors
Asian Color (default: Orange)
London Color (default: Blue)
Session Start Lines Color (default: Red)
Daily Open Line Color (default: White)
⚡ Optimizations
Automatic timeframe detection (works on all TF)
Accurate line position calculation based on timeframe
Optimized memory management with old line deletion
Version 2.0 - January 2025
By MRG Trading
ملاحظات الأخبار
📖 FULL DESCRIPTIONMRG Session High/Low - Professional Trading Sessions Indicator
The ultimate indicator to identify and visualize key levels of major trading sessions with full customization.
🎯 Main Features
📊 Session Visualization
Asian Session (default: 18:00 - 03:00 NY time)
High and Low of the session in orange
Vertical session start line
London Session (default: 03:00 - 09:30 NY time)
High and Low of the session in blue
Vertical session start line
New York Session (default: 09:30+ NY time)
Vertical session start line
Marks the end of London session
🌍 Multi-Timezone Support
Dropdown menu with 12 major timezones:
America: New York, Chicago, Los Angeles
Europe: London, Paris, Berlin
Asia: Tokyo, Shanghai, Hong Kong, Singapore
Pacific: Sydney, Auckland
⚙️ Full Customization
Flexible Schedule:
Set your own session times
Adapt the indicator to your trading strategy
Compatible with all timezones
Line Styles:
Choose between Solid, Dashed or Dotted for each line type
Adjust thickness from 1 to 5
Customizable Colors:
Asian Session (default: Orange)
London Session (default: Blue)
Session start lines (default: Red)
Daily Open line (default: White)
🔄 Smart Operation
Advance Placement: All session vertical lines appear at the start of Asian session for optimal reference
Automatic Cleanup: Previous day's levels are automatically deleted at 18:00 (or your custom Asian start time)
Automatic Adaptation: Works on all timeframes (1m, 5m, 15m, 1h, etc.)
📍 Visual Markers
3 session lines: Asian, London, New York
1 Daily Open line: Marks the start of your trading day
Session High/Low: Horizontal levels extended to the right
💡 Recommended Use
Perfect for:
✅ Day traders on FOREX and precious metals (XAUUSD)
✅ Scalpers looking for key session levels
✅ Breakout traders on sessions
✅ Strategies based on institutional trading hours
🎓 Perfect for All Levels
Beginners: Default configuration optimized for NY timezone
Advanced: Full customization for your unique strategy
Professionals: Accurate and reliable visualization tools
📋 PATCH NOTES - MRG Session High/Low v2.0
🐛 Bug Fixes
✅ Line Thickness Correction: The "Line thickness" parameter now correctly applies to ALL lines, including the Daily Open line
✨ New Features
🌍 Customizable Timezone (Dropdown Menu)
Easy selection of your timezone via dropdown menu
12 available timezones:
America: New York, Chicago, Los Angeles
Europe: London, Paris, Berlin
Asia: Tokyo, Shanghai, Hong Kong, Singapore
Pacific: Sydney, Auckland
⏰ 100% Customizable Session Times
Asian Session Start: Choose start time (default: 18:00)
London Session Start: Choose start time (default: 03:00)
New York Session Start: Choose start time (default: 09:30)
Daily Open Time: Define your trading day start (default: 00:00)
📍 Vertical Reference Lines
Advance Placement: All session lines appear at the start of Asian session
3 session lines: Asian, London, New York (red by default, customizable)
1 Daily Open line: Marks the day start (white by default, customizable)
Automatic Cleanup: All old lines are deleted at the start of each new Asian session
🎨 Complete Line Style Customization
4 customizable line types:
Asian High/Low Lines (Solid/Dashed/Dotted)
London High/Low Lines (Solid/Dashed/Dotted)
Session Start Lines (Solid/Dashed/Dotted)
Daily Open Line (Solid/Dashed/Dotted)
Line Thickness: Adjustable width from 1 to 5
🎨 Customizable Colors
Asian Color (default: Orange)
London Color (default: Blue)
Session Start Lines Color (default: Red)
Daily Open Line Color (default: White)
⚡ Optimizations
Automatic timeframe detection (works on all TF)
Accurate line position calculation based on timeframe
Optimized memory management with old line deletion
Version 2.0 - January 2025
By MRG Trading
ملاحظات الأخبار
✅ Applied Corrections:Projection Limit: Maximum of 400 bars into the future (instead of 500+)
Pre-draw Verification: Lines are only drawn if they are within the limit
Extension Reduction: High/Low lines extend 100 bars instead of 500
All Timeframes Compatible: Now works from M1 to H4 without errors
The indicator now works perfectly on all timeframes: M1, M3, M5, M15, M30, M45, H1, H2, H4! 🎯
ملاحظات الأخبار
📋 PATCH NOTES - MRG Session High/Low v2.0🐛 Bug Fixes
Critical Fix: Lines not displaying on M1 timeframe
Removed MAX_BARS = 400 limitation that prevented lines from appearing on lower timeframes
Lines now display correctly on all timeframes including M1, M5, M15, etc.
Fixed: Lines moving when zooming/panning the chart
Added xloc=xloc.bar_time parameter to vertical session lines
Added xloc=xloc.bar_index parameter to horizontal high/low lines
Lines are now properly anchored to their respective candles and don't shift when chart is moved
Fixed: Type conversion errors
Converted math.floor() results from float to int
Converted modulo operator % results to int
Updated getFutureTime() function to return int instead of float
All function parameters properly typed to prevent compilation errors
✨ Improvements
Enhanced time calculation system
Implemented getFutureTime() function for accurate timestamp calculations
Replaced bar count estimation with direct time-based positioning
Session lines now placed at exact times regardless of timeframe
Optimized coordinate system
Vertical lines (session starts) use xloc.bar_time for time-based positioning
Horizontal lines (high/low levels) use xloc.bar_index for bar-based positioning
Ensures stability across all timeframes and zoom levels
ملاحظات الأخبار
🐛 BUG FIXESFixed: Asian Lines Not Deleting When Broken
Issue: Lines would remain visible even after being clearly breached by price
Cause: Detection only occurred at NY open using close price
Resolution: Implemented real-time monitoring using high and low wicks
Fixed: Both Lines Deleted When Only One Broken
Issue: Breaking one level would delete both High and Low lines
Cause: Combined OR condition (high > asianHigh) or (low < asianLow)
Resolution: Separated into independent conditional blocks
⚙️ CONFIGURATION
No new settings added. Feature works automatically with existing parameters:
Show Asian Session must be enabled
Lines are monitored after London session start (when they become active)
📈 PERFORMANCE
Efficiency: Minimal performance impact
Resource Usage: No additional lines/objects created
Processing: Check runs only when asianLinesDrawn = true
🔄 COMPATIBILITY
Pine Script Version: v6
TradingView: All plans
Timeframes: All (designed for intraday trading)
Backward Compatible: Yes - no breaking changes to existing settings
📝 NOTES
Lines are deleted immediately upon breakout, not at candle close
Deletion is permanent until next Asian session creates new levels
Works with all timezone settings
Compatible with custom session times
🚀 COMING SOON
Future enhancements under consideration:
Optional alerts when levels are broken
Color change instead of deletion (optional mode)
Retest markers after breakout
Breakout statistics tracking
📞 SUPPORT
For bug reports or feature requests, please contact the development team.
Version: 2.1.0
Build Date: 2026-01-22
Compatibility: Pine Script v6+
ملاحظات الأخبار
📋 PATCH NOTES v3.0.0MRG Session High/Low Indicator
Release Date: January 29, 2026
Version: 3.0.0
Pine Script Version: v6
🆕 NEW FEATURES
Previous Day New York High/Low Tracking
Previous Session Levels: Automatically displays previous day's New York session High and Low levels
Wick-Anchored Lines: NY lines now originate from the exact candle where the high/low was formed (anchored to wicks)
Daily Reset: Levels update at Asian session start (18:00 EST) each day
Toggle Control: Can be enabled/disabled via "Show New York Previous Day" setting
Enhanced Label System
Clean Text Labels: Labels now display as pure text without background shapes or containers
Price-Level Positioning: All labels positioned exactly ON their respective price lines using yloc.price
Label Control: Global toggle to show/hide all labels
Color-Coded: Labels match their session colors (Asia: turquoise, London: blue, NY: gray)
Session Timing Adjustment
Pre-Market London Close: London session High/Low lines now drawn at 8:30 AM EST (pre-market open) instead of 9:30 AM
New Green Vertical Line: Added visual marker at 8:30 AM to indicate pre-market start
Improved Accuracy: Better alignment with actual trading day structure
🔧 IMPROVEMENTS
Visual Design Enhancements
Label Styling:
BEFORE: Labels in colored boxes/triangles with backgrounds
AFTER: Clean text-only labels positioned directly on price lines
Color Scheme:
Asia High/Low: #26a69a (Turquoise)
London High/Low: #2196f3 (Blue)
New York High/Low: #607d8b (Gray)
Session Markers: Red (Asian, London, NY), Green (Pre-Market)
Line Anchoring:
BEFORE: NY lines started from Asian session open
AFTER: NY lines start from exact bar where high/low was formed
Auto-Deletion System (Existing Feature)
Asian High line disappears when price breaks above
Asian Low line disappears when price breaks below
Independent deletion (only broken level is removed)
Labels automatically deleted with their lines
📊 TECHNICAL CHANGES
New Data Structures
pinescriptvar int prevNYHighBar = na // Track bar index of NY high
var int prevNYLowBar = na // Track bar index of NY low
```
### Modified Functions
1. **NY Line Creation**
- Lines now use historical bar indices instead of current bar
- Anchored to actual high/low formation points
2. **Label Positioning**
- Changed from `yloc.abovebar/belowbar` to `yloc.price`
- Eliminates vertical offset from price levels
3. **London Session End Time**
- Modified from 9:30 AM to 8:30 AM
- New pre-market detection function added
---
## ⚙️ NEW SETTINGS
### Labels Group
- **Show Labels** (bool): Master toggle for all label visibility
- ~~Label Position~~ (removed): Labels now always on price line
### Sessions Group
- **Show New York Previous Day** (bool): Toggle NY previous day levels
### Session Times Group
- **Pre-Market NY (London End)** (session): Configurable pre-market start time (default: 08:30)
---
## 🎯 USE CASES
### Scenario 1: Pre-Market Trading
```
8:30 AM → London levels finalized
→ Green vertical line appears
→ Trade retest of London High/Low
```
### Scenario 2: Previous Day Analysis
```
Asian Open (18:00) → Previous NY High/Low displayed
→ Use as support/resistance zones
→ Plan entries around these levels
```
### Scenario 3: Multi-Session Strategy
```
Asia High: 2050.00 ← Turquoise line with label
London High: 2055.00 ← Blue line with label
NY High (prev): 2048.00 ← Gray line anchored to formation bar
```
---
## 🐛 BUG FIXES
### Fixed: Compilation Errors
- **Issue**: Special characters in strings causing compilation failures
- **Resolution**: Replaced all curved quotes with standard ASCII quotes
### Fixed: Pine Script Version Warning
- **Issue**: Unspecified version causing compatibility warnings
- **Resolution**: Explicitly declared `//version=6`
### Fixed: Label Positioning Inconsistency
- **Issue**: Labels appearing above/below lines instead of on them
- **Resolution**: Changed `yloc` parameter to `yloc.price` for all labels
### Fixed: NY Lines Not Historical
- **Issue**: NY lines started from current bar instead of formation point
- **Resolution**: Store and use historical bar indices (`prevNYHighBar`, `prevNYLowBar`)
---
## 📈 PERFORMANCE
- **Memory Efficiency**: Proper cleanup of old lines and labels
- **Max Lines**: 500 (configurable via `max_lines_count`)
- **Max Labels**: 500 (configurable via `max_labels_count`)
- **Processing**: Optimized session detection logic
---
## 🔄 COMPATIBILITY
- **Pine Script Version**: v6+
- **TradingView**: All plans
- **Timeframes**: Optimized for M1-H4 (intraday trading)
- **Markets**: All markets (optimized for Forex, Gold, Indices)
- **Backward Compatible**: Existing settings preserved
---
## 📝 SESSION STRUCTURE
Current session configuration (EST timezone):
```
18:00 → Asian Session Opens
├─ Asian High/Low tracking begins
└─ NY Previous Day levels displayed
03:00 → London Session Opens
├─ Asian High/Low finalized
└─ London High/Low tracking begins
08:30 → Pre-Market Opens (Green line)
└─ London High/Low finalized
09:30 → New York Session Opens (Red line)
└─ NY High/Low tracking begins
```
---
## 🎨 VISUAL EXAMPLE
```
New York High ───────────────────── (Gray text on line)
↑
│ Line starts from this historical wick
Asia High ──────────────────────────── (Turquoise text)
London Low ─────────────────────────── (Blue text)
⚠️ BREAKING CHANGES
Removed Features
Label Position Setting: Removed "Above/Below" option
Reason: Labels now always positioned on price lines for consistency
Migration: No action needed, labels automatically positioned correctly
ملاحظات الأخبار
📝 MRG Session High/Low - v3.0 PATCH NOTES✨ NEW FEATURES
🔴 PDH/PDL (Previous Day High/Low)
PDH = Previous day's highest price (00:00 to 23:59)
PDL = Previous day's lowest price (00:00 to 23:59)
Displays at midnight (00:00) when new day starts
Lines anchored to exact candle where high/low formed
Labels "PDH" and "PDL" in red (customizable)
📊 SESSION TRACKING
Asian Session (18:00 → 00:00)
Tracks High/Low from 6 PM to midnight
Lines drawn at 03:00 (London Start)
Auto-delete when broken
London Session (03:00 → 08:00)
Lines drawn at 08:00 (London End)
NY Previous Day
Previous NY session High/Low
Displayed at 18:00 (Asian Start)
🎨 CUSTOMIZATION
Individual colors for each level
Line styles (Solid/Dashed/Dotted)
Toggle ON/OFF for each element
Multi-timezone support
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.