OPEN-SOURCE SCRIPT
Key Levels v1

Key Levels
This comprehensive multi-timeframe indicator provides traders with key price levels and opening ranges across multiple timeframes, designed to identify significant support/resistance zones and market structure.
KEY FEATURES:
📦 Monthly Range Box
- Automatically draws a box capturing the high and low of the first 9 hours of each new month
- Box extends until the next month begins
- Includes an optional mid-line showing the 50% level of the range
- Fully customizable colors, line styles, and background opacity
📊 Multi-Timeframe Open Lines
The indicator plots horizontal lines at the open price of:
- Midnight Open (00:00 session start)
- 4-Hour Open (updates every 4-hour candle)
- Daily Open (true daily candle open)
- Weekly Open (start of trading week)
- Monthly Open (start of new month)
- Yearly Open (start of new year)
🎯 Smart Label System
- Automatic label combining when multiple timeframe opens overlap at the same price
- Clean text labels positioned ahead of current price to avoid obstruction
- Labels show combined timeframes (e.g., "Monthly Open / Weekly Open")
⚙️ Customization Options
Each timeframe open line includes:
- Toggle on/off independently
- Custom color selection
- Line style options (Solid, Dashed, Dotted)
- Organized settings grouped by timeframe for easy navigation
🔧 Technical Implementation
- Uses request.security() for accurate higher timeframe data
- Works on any chart timeframe
- Lines extend 10 bars beyond current price for clear label visibility
- Efficient overlap detection prevents duplicate labels
IDEAL FOR:
✓ Identifying key institutional levels
✓ Trading range breakouts
✓ Multi-timeframe analysis
✓ Support and resistance zones
✓ Session-based trading strategies
All settings are organized chronologically from shortest to longest timeframe for intuitive configuration.
This comprehensive multi-timeframe indicator provides traders with key price levels and opening ranges across multiple timeframes, designed to identify significant support/resistance zones and market structure.
KEY FEATURES:
📦 Monthly Range Box
- Automatically draws a box capturing the high and low of the first 9 hours of each new month
- Box extends until the next month begins
- Includes an optional mid-line showing the 50% level of the range
- Fully customizable colors, line styles, and background opacity
📊 Multi-Timeframe Open Lines
The indicator plots horizontal lines at the open price of:
- Midnight Open (00:00 session start)
- 4-Hour Open (updates every 4-hour candle)
- Daily Open (true daily candle open)
- Weekly Open (start of trading week)
- Monthly Open (start of new month)
- Yearly Open (start of new year)
🎯 Smart Label System
- Automatic label combining when multiple timeframe opens overlap at the same price
- Clean text labels positioned ahead of current price to avoid obstruction
- Labels show combined timeframes (e.g., "Monthly Open / Weekly Open")
⚙️ Customization Options
Each timeframe open line includes:
- Toggle on/off independently
- Custom color selection
- Line style options (Solid, Dashed, Dotted)
- Organized settings grouped by timeframe for easy navigation
🔧 Technical Implementation
- Uses request.security() for accurate higher timeframe data
- Works on any chart timeframe
- Lines extend 10 bars beyond current price for clear label visibility
- Efficient overlap detection prevents duplicate labels
IDEAL FOR:
✓ Identifying key institutional levels
✓ Trading range breakouts
✓ Multi-timeframe analysis
✓ Support and resistance zones
✓ Session-based trading strategies
All settings are organized chronologically from shortest to longest timeframe for intuitive configuration.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.