OPEN-SOURCE SCRIPT
已更新 Multi-Timeline 1.0

Multi-TimeLines 1.0 - Comprehensive Description
WHAT IT DOES:
This indicator creates dynamic horizontal support/resistance lines based on opening prices captured at user-defined New York times. Unlike static horizontal lines, these levels automatically appear and disappear based on sophisticated session logic, providing traders with time-sensitive reference levels that adapt to market sessions.
HOW IT WORKS - TECHNICAL IMPLEMENTATION:
The script uses Pine Script's "America/New_York" timezone functions to ensure all time calculations are based on NY time, regardless of the user's chart timezone. This eliminates confusion and provides consistent behavior across global markets.
The indicator employs a unique two-category classification system:
Category A (16:00-23:59 NY): Evening times that extend overnight until next day 15:59 NY
Category B (00:00-15:59 NY): Day times that extend until same day 15:59 NY
This classification handles the complex logic of overnight sessions and prevents lines from incorrectly resetting at midnight for evening times.
3. Price Capture Mechanism:
Uses precise time-hit detection with backup systems for edge cases (especially midnight 00:00). When a specified time occurs, the script captures the bar's opening price and stores it in persistent variables using Pine Script's var declarations.
4. Session-Aware Display Logic:
Lines only appear during their designated "display windows" - periods when the captured price level is relevant. The script uses conditional plotting with plot.style_linebr to create clean breaks when lines are inactive.
5. Smart Reset System:
Different reset behaviors based on time classification:
ORIGINALITY & UNIQUE FEATURES:
Unlike basic horizontal line tools, this script properly handles overnight spans for evening times, making it invaluable for analyzing gaps and overnight price action.
No manual line drawing required - the script automatically manages when lines appear/disappear based on NY market sessions (15:59 close, 18:00 after-hours start).
Lines only show during relevant periods, reducing chart clutter and focusing attention on currently active levels.
TRADING CONCEPTS & APPLICATIONS:
1. Session-Based Analysis:
Capture opening prices at key session times:
00:00 NY: Sydney/Asian session start
03:00 NY: London pre-market
08:00 NY: London session open
09:30 NY: NYSE opening bell
18:00 NY: After-hours start
2. Gap Analysis:
Evening times (20:00-23:59) that extend overnight are particularly useful for:
Identifying potential gap-fill levels
Tracking overnight high/low breaks
Setting reference points for next-day trading
3. Support/Resistance Framework:
Opening prices at significant times often act as:
Intraday support/resistance levels
Reference points for breakout/breakdown analysis
Pivot levels for mean reversion strategies
HOW TO USE:
Enter times in "HH:MM" format using 24-hour NY time:
"09:30" for NYSE open
"15:30" for late-day reference
"20:00" for evening level (extends overnight)
Blue/Green/Cyan/Red lines: Your custom times
Yellow line: After-hours day open (18:00 NY start)
Lines appear with breaks during inactive periods
3. Strategic Setup:
Use 2-3 key session times for your trading style
Combine morning times (immediate reference) with evening times (overnight analysis)
Toggle after-hours line based on your market focus
CALCULATION METHOD:
The script uses direct opening price capture (no smoothing or averaging) at precise time hits, ensuring the most accurate representation of actual market levels at specified times. This raw price approach maintains the integrity of actual market opening prices rather than manipulated or calculated values.
This method is particularly effective because opening prices at significant times often represent institutional order flow and can act as magnetic levels throughout subsequent sessions.
WHAT IT DOES:
This indicator creates dynamic horizontal support/resistance lines based on opening prices captured at user-defined New York times. Unlike static horizontal lines, these levels automatically appear and disappear based on sophisticated session logic, providing traders with time-sensitive reference levels that adapt to market sessions.
HOW IT WORKS - TECHNICAL IMPLEMENTATION:
- 1.
The script uses Pine Script's "America/New_York" timezone functions to ensure all time calculations are based on NY time, regardless of the user's chart timezone. This eliminates confusion and provides consistent behavior across global markets.
- 2.
The indicator employs a unique two-category classification system:
Category A (16:00-23:59 NY): Evening times that extend overnight until next day 15:59 NY
Category B (00:00-15:59 NY): Day times that extend until same day 15:59 NY
This classification handles the complex logic of overnight sessions and prevents lines from incorrectly resetting at midnight for evening times.
3. Price Capture Mechanism:
Uses precise time-hit detection with backup systems for edge cases (especially midnight 00:00). When a specified time occurs, the script captures the bar's opening price and stores it in persistent variables using Pine Script's var declarations.
4. Session-Aware Display Logic:
Lines only appear during their designated "display windows" - periods when the captured price level is relevant. The script uses conditional plotting with plot.style_linebr to create clean breaks when lines are inactive.
5. Smart Reset System:
Different reset behaviors based on time classification:
- Category A times persist across midnight (for overnight analysis)
- Category B times reset on day changes (except 00:00 which captures AT day change)
- Automatic cleanup when display windows close
ORIGINALITY & UNIQUE FEATURES:
- 1. Overnight Session Handling:
Unlike basic horizontal line tools, this script properly handles overnight spans for evening times, making it invaluable for analyzing gaps and overnight price action.
- 2. Automatic Session Management:
No manual line drawing required - the script automatically manages when lines appear/disappear based on NY market sessions (15:59 close, 18:00 after-hours start).
- 3. Time-Window Display Logic:
Lines only show during relevant periods, reducing chart clutter and focusing attention on currently active levels.
TRADING CONCEPTS & APPLICATIONS:
1. Session-Based Analysis:
Capture opening prices at key session times:
00:00 NY: Sydney/Asian session start
03:00 NY: London pre-market
08:00 NY: London session open
09:30 NY: NYSE opening bell
18:00 NY: After-hours start
2. Gap Analysis:
Evening times (20:00-23:59) that extend overnight are particularly useful for:
Identifying potential gap-fill levels
Tracking overnight high/low breaks
Setting reference points for next-day trading
3. Support/Resistance Framework:
Opening prices at significant times often act as:
Intraday support/resistance levels
Reference points for breakout/breakdown analysis
Pivot levels for mean reversion strategies
HOW TO USE:
- 1. Time Input:
Enter times in "HH:MM" format using 24-hour NY time:
"09:30" for NYSE open
"15:30" for late-day reference
"20:00" for evening level (extends overnight)
- 2. Line Behavior:
Blue/Green/Cyan/Red lines: Your custom times
Yellow line: After-hours day open (18:00 NY start)
Lines appear with breaks during inactive periods
3. Strategic Setup:
Use 2-3 key session times for your trading style
Combine morning times (immediate reference) with evening times (overnight analysis)
Toggle after-hours line based on your market focus
CALCULATION METHOD:
The script uses direct opening price capture (no smoothing or averaging) at precise time hits, ensuring the most accurate representation of actual market levels at specified times. This raw price approach maintains the integrity of actual market opening prices rather than manipulated or calculated values.
This method is particularly effective because opening prices at significant times often represent institutional order flow and can act as magnetic levels throughout subsequent sessions.
發行說明
Updated Chart view of indicator開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
開源腳本
本著TradingView的真正精神,此腳本的創建者將其開源,以便交易者可以查看和驗證其功能。向作者致敬!雖然您可以免費使用它,但請記住,重新發佈程式碼必須遵守我們的網站規則。
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。