OPEN-SOURCE SCRIPT
Developing Midpoint Tracker

Developing Midpoint Tracker (DMT)
Original Concept: This indicator tracks key midpoint levels from either session opens or custom timeframe periods, providing precise reference levels for intraday trading decisions.
Dual Tracking Modes:
Session Mode: Tracks midpoints from a specific session start time (e.g., 1800 ET electronic trading open) with full timezone support
Timeframe Mode: Tracks midpoints from any custom timeframe (15m, 1H, 4H, etc.) using higher timeframe OHLC data via request.security()
Core Calculations:
The indicator calculates three distinct midpoint levels:
Open-to-High Midpoint: (Session/Timeframe Open + Highest High) / 2
Open-to-Low Midpoint: (Session/Timeframe Open + Lowest Low) / 2
High-to-Low Midpoint: (Highest High + Lowest Low) / 2
Visual Features:
Horizontal lines extending from the reference period start with customizable colors, styles, and extension length
Smart collision detection prevents duplicate lines at identical price levels
Price labels with transparent backgrounds showing exact values
Optional reference open price line
Real-time info table displaying current mode and all calculated levels
Technical Implementation:
Uses Pine Script's native time() function for accurate session detection across multiple timezones
Employs request.security() for reliable higher timeframe data access
Implements proper line and label management to prevent memory issues
Supports 13 major global timezones including US markets, Europe, and Asia
Use Cases:
Identifying potential support/resistance levels from key price relationships
Setting profit targets and stop levels based on mathematical price midpoints
Analyzing price behavior around session or timeframe-specific reference levels
Multi-timeframe analysis when using custom timeframe mode on lower timeframe charts
This indicator is particularly useful for traders who utilize midpoint reversion strategies or need precise reference levels derived from session or timeframe opens.
Original Concept: This indicator tracks key midpoint levels from either session opens or custom timeframe periods, providing precise reference levels for intraday trading decisions.
Dual Tracking Modes:
Session Mode: Tracks midpoints from a specific session start time (e.g., 1800 ET electronic trading open) with full timezone support
Timeframe Mode: Tracks midpoints from any custom timeframe (15m, 1H, 4H, etc.) using higher timeframe OHLC data via request.security()
Core Calculations:
The indicator calculates three distinct midpoint levels:
Open-to-High Midpoint: (Session/Timeframe Open + Highest High) / 2
Open-to-Low Midpoint: (Session/Timeframe Open + Lowest Low) / 2
High-to-Low Midpoint: (Highest High + Lowest Low) / 2
Visual Features:
Horizontal lines extending from the reference period start with customizable colors, styles, and extension length
Smart collision detection prevents duplicate lines at identical price levels
Price labels with transparent backgrounds showing exact values
Optional reference open price line
Real-time info table displaying current mode and all calculated levels
Technical Implementation:
Uses Pine Script's native time() function for accurate session detection across multiple timezones
Employs request.security() for reliable higher timeframe data access
Implements proper line and label management to prevent memory issues
Supports 13 major global timezones including US markets, Europe, and Asia
Use Cases:
Identifying potential support/resistance levels from key price relationships
Setting profit targets and stop levels based on mathematical price midpoints
Analyzing price behavior around session or timeframe-specific reference levels
Multi-timeframe analysis when using custom timeframe mode on lower timeframe charts
This indicator is particularly useful for traders who utilize midpoint reversion strategies or need precise reference levels derived from session or timeframe opens.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.
Open-source script
In true TradingView spirit, the creator of this script has made it open-source, so that traders can review and verify its functionality. Kudos to the author! While you can use it for free, remember that republishing the code is subject to our House Rules.
Disclaimer
The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.