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.
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน
สคริปต์โอเพนซอร์ซ
ด้วยเจตนารมณ์หลักของ TradingView ผู้สร้างสคริปต์นี้ได้ทำให้เป็นโอเพนซอร์ส เพื่อให้เทรดเดอร์สามารถตรวจสอบและยืนยันฟังก์ชันการทำงานของมันได้ ขอชื่นชมผู้เขียน! แม้ว่าคุณจะใช้งานได้ฟรี แต่โปรดจำไว้ว่าการเผยแพร่โค้ดซ้ำจะต้องเป็นไปตาม กฎระเบียบการใช้งาน ของเรา
คำจำกัดสิทธิ์ความรับผิดชอบ
ข้อมูลและบทความไม่ได้มีวัตถุประสงค์เพื่อก่อให้เกิดกิจกรรมทางการเงิน, การลงทุน, การซื้อขาย, ข้อเสนอแนะ หรือคำแนะนำประเภทอื่น ๆ ที่ให้หรือรับรองโดย TradingView อ่านเพิ่มเติมใน ข้อกำหนดการใช้งาน