OPEN-SOURCE SCRIPT

Trading Sessions with High/Low Levels

13
Trading Sessions with High/Low Levels

📊 Overview
This comprehensive indicator displays the three major trading sessions (Asia, London, USA) with customizable background colors and automatically tracks the high and low levels of each session. Perfect for forex, indices, and any market that operates across different time zones.

🎯 Key Features
Session Background Colors
  • Asia Session: Customizable red background (default: 02:00-09:00)
  • London Session: Customizable green background (default: 09:00-15:00)
  • USA Session: Customizable blue background (default: 15:00-23:00)
  • Fully adjustable session times and colors

High/Low Level Tracking
  • Automatic detection of session highs and lows
  • Horizontal lines marking key levels
  • Optional labels displaying exact price values
  • Customizable line styles (solid, dashed, dotted)
  • Adjustable line width and colors

Flexible Display Options
  • Show/hide any combination of sessions
  • Control number of historical sessions to display (1-21)
  • Option to show only current day sessions
  • Extend lines to current bar or end at session close
  • Customizable label sizes and colors


⚙️ Configuration Options
Session Settings (Each session independently configurable)
  • Background Color: Choose any color with transparency control
  • Session Times: Fully customizable start and end times
  • Line Colors: Independent colors for each session's levels
  • Line Styles: Solid, dashed, or dotted lines
  • Line Width: 1-5 pixel width options
  • Labels: Show/hide price labels with size control

Global Settings
  • UTC Timezone Adjustment: Automatically adjust for your local timezone (+/-12 to +14)
  • Historical Sessions: Display 1-21 previous sessions
  • Current Day Filter: Option to show only today's sessions
  • Line Extension: Choose to extend lines to current bar or session end


🚀 How It Works
  1. Session Detection: The indicator automatically detects when each trading session begins and ends
  2. Level Tracking: During each active session, it continuously tracks the highest high and lowest low
  3. Visual Display: When a session ends, horizontal lines are drawn at the session's high and low levels
  4. Historical Data: Previous sessions remain visible according to your settings


🛠️ Setup Instructions
  1. Add to Chart: Apply the indicator to any intraday chart
  2. Configure Sessions: Adjust session times for your preferred market hours
  3. Customize Appearance: Set colors, line styles, and label preferences
  4. Set Timezone: Adjust UTC offset to match your local timezone
  5. Choose Display Options: Select how many sessions and which features to show


⚠️ Important Notes
  • Intraday Only: This indicator only works on intraday timeframes (not daily, weekly, monthly)
  • Session Times: Default times are in UTC format - adjust the timezone setting accordingly
  • Performance: Showing many historical sessions may impact chart performance


🌍 Timezone Examples
  • New York (EST): UTC -5 (winter) / UTC -4 (summer)
  • London (GMT): UTC +0 (winter) / UTC +1 (summer)
  • Tokyo (JST): UTC +9
  • Sydney (AEDT): UTC +11


🔧 Troubleshooting
Lines not appearing?
  • Check that "Show High/Low lines" is enabled for the desired sessions
  • Verify session times match your market's trading hours
  • Ensure you're on an intraday timeframe

Wrong timezone?
  • Adjust the "UTC Time Zone Adjustment" setting
  • Remember to account for daylight saving time changes

Too many lines?
  • Reduce the "Number of sessions to show lines" setting
  • Enable "Only show current day sessions" option



This indicator is designed to help traders identify key levels and understand market structure across different trading sessions. Use it as part of a comprehensive trading strategy and always practice proper risk management.

免責聲明

這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。