PROTECTED SOURCE SCRIPT
已更新 Time Based Range

# Time Based Range
**A fully customizable session-based range indicator for intraday and daily trading analysis**
## Overview
The Time Based Range indicator identifies and visualizes key price levels from any user-defined time session. Whether you're trading the London open, New York session, or any custom timeframe, this indicator helps you identify crucial support and resistance levels formed during specific trading periods.
## Key Features
### 🕒 **Flexible Session Configuration**
- Customize any time range (e.g., 05:00-13:00, 20:00-02:00)
- Select specific days of the week (Sunday=1 through Saturday=7)
- Works on any timeframe from 1-minute to daily charts
### 📊 **Three Display Modes**
**OHLC Mode:**
- Shows Open, High, Low, Close, and Midpoint lines
- Fully customizable line colors, styles, and widths
- Optional labels with custom text
- Toggle individual lines on/off
**Range Mode:**
- Displays High, Low, and Midpoint lines extending into the future
- Session background box for visual clarity
- Configurable extension length in hours
- Clean range-based analysis
**Mitigate Mode:**
- Horizontal pivot lines that extend until price "mitigates" (touches) them
- Session background box
- Lines automatically stop extending when price reaches the level
- Perfect for ICT-style analysis
### 🚨 **Advanced Alert System**
**Breakout Alerts:**
- Notifies when price breaks above session high or below session low
- Real-time notifications for range expansion
**Liquidity Sweep Alerts:**
- Detects when price briefly breaks a level but closes back inside the range
- Configurable lookback period for sweep detection
- Helps identify false breakouts and liquidity grabs
**Equilibrium Rejection Alerts:**
- Monitors price reaction at the session midpoint
- Detects strong rejections with wick formations
- Configurable sensitivity threshold
### 🎨 **Full Customization**
- Individual color settings for all lines and boxes
- Multiple line style options (Solid, Dashed, Dotted)
- Adjustable line widths and transparency
- Custom label text and positioning
- Session limit control (1-10 sessions displayed)
## Use Cases
### Day Trading
- Mark key levels from overnight sessions
- Identify London/New York opening ranges
- Track Asian session highs and lows
### Swing Trading
- Daily range analysis
- Multi-day level identification
- Key support/resistance from specific periods
### ICT/SMC Trading
- Liquidity pool identification
- Fair value gap analysis
- Market structure understanding
## Technical Specifications
- **Maximum Sessions:** 1-10 (user configurable)
- **Time Format:** 24-hour (HHMM-HHMM)
- **Day Selection:** Individual day toggles (1=Sunday through 7=Saturday)
- **Alert Types:** 4 different alert conditions
- **Drawing Objects:** Optimized with automatic cleanup
- **Performance:** Efficient array management prevents chart lag
## Best Practices
1. **Start Simple:** Begin with OHLC mode to understand session dynamics
2. **Use Alerts:** Enable notifications for key level interactions
3. **Combine Modes:** Switch between modes based on market conditions
4. **Optimize Settings:** Adjust colors and styles for your chart theme
5. **Multiple Timeframes:** Use different sessions for various trading strategies
## Compatibility
- Works on all TradingView chart types
- Compatible with all asset classes (Forex, Stocks, Crypto, Futures)
- Optimized for both light and dark themes
- Mobile-friendly display
---
*This indicator helps traders identify high-probability trading zones based on time-specific price action. Always combine with proper risk management and additional analysis methods.*
**A fully customizable session-based range indicator for intraday and daily trading analysis**
## Overview
The Time Based Range indicator identifies and visualizes key price levels from any user-defined time session. Whether you're trading the London open, New York session, or any custom timeframe, this indicator helps you identify crucial support and resistance levels formed during specific trading periods.
## Key Features
### 🕒 **Flexible Session Configuration**
- Customize any time range (e.g., 05:00-13:00, 20:00-02:00)
- Select specific days of the week (Sunday=1 through Saturday=7)
- Works on any timeframe from 1-minute to daily charts
### 📊 **Three Display Modes**
**OHLC Mode:**
- Shows Open, High, Low, Close, and Midpoint lines
- Fully customizable line colors, styles, and widths
- Optional labels with custom text
- Toggle individual lines on/off
**Range Mode:**
- Displays High, Low, and Midpoint lines extending into the future
- Session background box for visual clarity
- Configurable extension length in hours
- Clean range-based analysis
**Mitigate Mode:**
- Horizontal pivot lines that extend until price "mitigates" (touches) them
- Session background box
- Lines automatically stop extending when price reaches the level
- Perfect for ICT-style analysis
### 🚨 **Advanced Alert System**
**Breakout Alerts:**
- Notifies when price breaks above session high or below session low
- Real-time notifications for range expansion
**Liquidity Sweep Alerts:**
- Detects when price briefly breaks a level but closes back inside the range
- Configurable lookback period for sweep detection
- Helps identify false breakouts and liquidity grabs
**Equilibrium Rejection Alerts:**
- Monitors price reaction at the session midpoint
- Detects strong rejections with wick formations
- Configurable sensitivity threshold
### 🎨 **Full Customization**
- Individual color settings for all lines and boxes
- Multiple line style options (Solid, Dashed, Dotted)
- Adjustable line widths and transparency
- Custom label text and positioning
- Session limit control (1-10 sessions displayed)
## Use Cases
### Day Trading
- Mark key levels from overnight sessions
- Identify London/New York opening ranges
- Track Asian session highs and lows
### Swing Trading
- Daily range analysis
- Multi-day level identification
- Key support/resistance from specific periods
### ICT/SMC Trading
- Liquidity pool identification
- Fair value gap analysis
- Market structure understanding
## Technical Specifications
- **Maximum Sessions:** 1-10 (user configurable)
- **Time Format:** 24-hour (HHMM-HHMM)
- **Day Selection:** Individual day toggles (1=Sunday through 7=Saturday)
- **Alert Types:** 4 different alert conditions
- **Drawing Objects:** Optimized with automatic cleanup
- **Performance:** Efficient array management prevents chart lag
## Best Practices
1. **Start Simple:** Begin with OHLC mode to understand session dynamics
2. **Use Alerts:** Enable notifications for key level interactions
3. **Combine Modes:** Switch between modes based on market conditions
4. **Optimize Settings:** Adjust colors and styles for your chart theme
5. **Multiple Timeframes:** Use different sessions for various trading strategies
## Compatibility
- Works on all TradingView chart types
- Compatible with all asset classes (Forex, Stocks, Crypto, Futures)
- Optimized for both light and dark themes
- Mobile-friendly display
---
*This indicator helps traders identify high-probability trading zones based on time-specific price action. Always combine with proper risk management and additional analysis methods.*
發行說明
added time zone customizations發行說明
the main problem is that Pine Script's time() function uses exclusive end times. When you specify "0500-1300", it includes bars from 05:00 but excludes the 13:00 (1:00 PM) bar. added fix 發行說明
Updated chart visuals to better display script name and relevant session/timeframe context for publishing compliance.受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
Doer
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。
受保護腳本
此腳本以閉源形式發佈。 不過,您可以自由且不受任何限制地使用它 — 在此處了解更多資訊。
Doer
免責聲明
這些資訊和出版物並不意味著也不構成TradingView提供或認可的金融、投資、交易或其他類型的意見或建議。請在使用條款閱讀更多資訊。