PROTECTED SOURCE SCRIPT
Historical High/Low Levels

Visualize key historical support & resistance levels across multiple timeframes. Shows Today, Yesterday, 5D, 2W, 52W, and All-Time highs/lows with percentage distance from current price. Fully customizable with up to 10 configurable timeframes.
### What This Indicator Does
**Historical High/Low Levels** plots horizontal support and resistance lines based on the highest and lowest prices across multiple customizable timeframes. Each level displays the exact price and percentage distance from the current price, giving you instant context on where price sits within historical ranges.
The indicator draws short, clean lines at the right edge of your chart (not across the entire canvas) with labels showing:
- The timeframe (e.g., "5D High", "52W Low")
- The exact price level
- The percentage difference from current price
A companion summary table consolidates all levels in an easy-to-scan horizontal format, perfect for quick range analysis.
---
### The Problem It Solves
**Context is everything in trading.** Before entering any trade, you need to know:
1. **Where am I in the range?** Is price near the top or bottom of its recent range?
2. **How extended is this move?** A stock up 15% in 5 days behaves differently than one consolidating near its lows
3. **What are the key levels to watch?** Support and resistance zones from multiple timeframes
4. **Is this breakout real?** Knowing the 52-week or all-time high instantly validates breakout strength
Manually calculating these levels for every stock wastes time. This indicator does it automatically, updating in real-time as price moves.
---
### Key Features
✅ **10 Configurable Timeframes**
- 3 Fixed: Today, Yesterday, All-Time High/Low
- 7 Customizable: Default presets for 5D, 2W, 4W, 12W, 26W, 52W, 104W
- 3 Custom slots for any period you want (e.g., 90D, 180D, 365D)
✅ **Clean Visual Design**
- Short horizontal lines at chart edge (not cluttering the entire chart)
- Color-coded: Green for highs, Red for lows, Yellow for current price
- Customizable line style (Solid/Dashed/Dotted) and thickness
✅ **Horizontal Summary Table**
- At-a-glance view of all levels
- Shows: Period | Low $ | Low % | High $ | High %
- **Smart color mode**: Values colored relative to current price (green = above, red = below)
- Movable to any corner
✅ **Session Filtering**
- Toggle between Regular Trading Hours only or Include Extended Hours
- Important for stocks with significant pre/post market activity
✅ **Proper Y-Axis Scaling**
- Lines and labels move correctly when you adjust the price scale
- No "frozen on canvas" issues
✅ **Symbol Change Detection**
- Automatically refreshes all levels when you switch tickers
- No stale data from previous symbols
---
### How To Use It
**For Swing Traders:**
- Enable 5D, 2W, and 52W levels
- Look for price approaching 52W highs (potential breakout) or 52W lows (potential reversal/bounce)
- Use the percentage column to gauge how extended the current move is
**For Day Traders:**
- Focus on Today, Yesterday, and 5D levels
- Yesterday's high/low often act as intraday support/resistance
- Watch for breaks of these levels for momentum entries
**For Position Traders:**
- Enable longer timeframes: 26W, 52W, 104W (2 years)
- Use custom timeframes for quarterly levels (90D, 180D)
- All-Time High is crucial for breakout confirmation
**Reading the Table:**
- All values red in a row? Price is above the entire range for that period (bullish)
- All values green in a row? Price is below the entire range (bearish/oversold)
- Mixed colors? Price is within the range - look for support/resistance reactions
---
### Who Should Use This
- **Breakout Traders**: Instantly see if price is testing or breaking key highs
- **Mean Reversion Traders**: Identify overextended moves (price far from range midpoint)
- **Support/Resistance Traders**: Multi-timeframe confluence zones
- **Swing Traders**: Weekly and monthly range context
- **Day Traders**: Daily and weekly levels for intraday planning
- **Options Traders**: Strike selection based on historical ranges
---
### Tips & Tricks
1. **Confluence Zones**: When multiple timeframe levels cluster together, that's a stronger support/resistance zone
2. **Range Compression**: When 5D range is much smaller than 2W range, expect a volatility expansion
3. **Breakout Confirmation**: A true 52W high breakout should hold above the level on retest
4. **The 50% Rule**: If price is more than 50% above the 52W low, momentum is likely still bullish
5. **ATH Context**: Stocks making new all-time highs have no overhead resistance - pure blue sky breakouts
6. **Table Color Mode**:
- Use "Relative to Current" to instantly see where you are in each range
- Use "Fixed" mode for traditional high=green, low=red coloring
7. **Declutter**: Use the "Show All Lines" master toggle to quickly hide lines while keeping the table visible
8. **Extended Hours**: Enable for stocks like TSLA/NVDA with significant pre-market gaps
---
### Default Configuration
The indicator comes pre-configured with the most commonly used levels:
- ✅ Today's High/Low
- ✅ Yesterday's High/Low
- ✅ 5-Day High/Low
- ✅ 2-Week High/Low
- ✅ 52-Week High/Low
- ✅ All-Time High/Low
Additional timeframes (4W, 12W, 26W, 104W, and 3 custom) are available but disabled by default to keep the chart clean.
---
### Settings Overview
| Setting | Description |
| ---------------------- | ---------------------------------------- |
| Show All Lines | Master toggle for all lines/labels |
| Label Offset | Distance of lines from chart edge (bars) |
| High/Low/Current Color | Customize level colors |
| Line Style | Solid, Dashed, or Dotted |
| Line Thickness | 1-4 pixels |
| Show Summary Table | Toggle table visibility |
| Table Position | Corner placement |
| Font Size | 1 (Tiny) to 5 (Huge) |
| Value Colors | Relative to Current or Fixed |
| Include Extended Hours | Pre/post market data toggle |
---
### Notes
- Uses daily timeframe data via `request.security()` for accurate historical calculations
- All-Time High/Low is calculated from all available historical data on your chart
- The indicator works on any timeframe chart - the levels are always based on daily data
- For best results, ensure your chart has sufficient historical data loaded
---
## 🔍 SEO-OPTIMIZED TITLE OPTIONS
1. Historical High/Low Levels [Multi-Timeframe Support & Resistance]
2. Historical High/Low Levels - 52W, ATH, Daily Range Visualizer
3. Historical High/Low Levels | Key Price Levels & Ranges
---
## 💬 SUGGESTED FIRST COMMENT (after publishing)
**How I Use This Indicator:**
I built this indicator because I got tired of manually checking 52-week highs, yesterday's range, and other key levels before every trade.
My typical workflow:
1. Add the indicator to any chart
2. Immediately see where current price sits in the daily, weekly, and yearly range
3. Look for confluence zones where multiple timeframes align
4. Use the percentage column to gauge if a move is overextended
The table with "Relative to Current" coloring is my favorite feature - one glance tells me if I'm buying near highs (all green = caution) or near lows (all red = potential opportunity).
Let me know what timeframe combinations work best for your trading style! 🎯
### What This Indicator Does
**Historical High/Low Levels** plots horizontal support and resistance lines based on the highest and lowest prices across multiple customizable timeframes. Each level displays the exact price and percentage distance from the current price, giving you instant context on where price sits within historical ranges.
The indicator draws short, clean lines at the right edge of your chart (not across the entire canvas) with labels showing:
- The timeframe (e.g., "5D High", "52W Low")
- The exact price level
- The percentage difference from current price
A companion summary table consolidates all levels in an easy-to-scan horizontal format, perfect for quick range analysis.
---
### The Problem It Solves
**Context is everything in trading.** Before entering any trade, you need to know:
1. **Where am I in the range?** Is price near the top or bottom of its recent range?
2. **How extended is this move?** A stock up 15% in 5 days behaves differently than one consolidating near its lows
3. **What are the key levels to watch?** Support and resistance zones from multiple timeframes
4. **Is this breakout real?** Knowing the 52-week or all-time high instantly validates breakout strength
Manually calculating these levels for every stock wastes time. This indicator does it automatically, updating in real-time as price moves.
---
### Key Features
✅ **10 Configurable Timeframes**
- 3 Fixed: Today, Yesterday, All-Time High/Low
- 7 Customizable: Default presets for 5D, 2W, 4W, 12W, 26W, 52W, 104W
- 3 Custom slots for any period you want (e.g., 90D, 180D, 365D)
✅ **Clean Visual Design**
- Short horizontal lines at chart edge (not cluttering the entire chart)
- Color-coded: Green for highs, Red for lows, Yellow for current price
- Customizable line style (Solid/Dashed/Dotted) and thickness
✅ **Horizontal Summary Table**
- At-a-glance view of all levels
- Shows: Period | Low $ | Low % | High $ | High %
- **Smart color mode**: Values colored relative to current price (green = above, red = below)
- Movable to any corner
✅ **Session Filtering**
- Toggle between Regular Trading Hours only or Include Extended Hours
- Important for stocks with significant pre/post market activity
✅ **Proper Y-Axis Scaling**
- Lines and labels move correctly when you adjust the price scale
- No "frozen on canvas" issues
✅ **Symbol Change Detection**
- Automatically refreshes all levels when you switch tickers
- No stale data from previous symbols
---
### How To Use It
**For Swing Traders:**
- Enable 5D, 2W, and 52W levels
- Look for price approaching 52W highs (potential breakout) or 52W lows (potential reversal/bounce)
- Use the percentage column to gauge how extended the current move is
**For Day Traders:**
- Focus on Today, Yesterday, and 5D levels
- Yesterday's high/low often act as intraday support/resistance
- Watch for breaks of these levels for momentum entries
**For Position Traders:**
- Enable longer timeframes: 26W, 52W, 104W (2 years)
- Use custom timeframes for quarterly levels (90D, 180D)
- All-Time High is crucial for breakout confirmation
**Reading the Table:**
- All values red in a row? Price is above the entire range for that period (bullish)
- All values green in a row? Price is below the entire range (bearish/oversold)
- Mixed colors? Price is within the range - look for support/resistance reactions
---
### Who Should Use This
- **Breakout Traders**: Instantly see if price is testing or breaking key highs
- **Mean Reversion Traders**: Identify overextended moves (price far from range midpoint)
- **Support/Resistance Traders**: Multi-timeframe confluence zones
- **Swing Traders**: Weekly and monthly range context
- **Day Traders**: Daily and weekly levels for intraday planning
- **Options Traders**: Strike selection based on historical ranges
---
### Tips & Tricks
1. **Confluence Zones**: When multiple timeframe levels cluster together, that's a stronger support/resistance zone
2. **Range Compression**: When 5D range is much smaller than 2W range, expect a volatility expansion
3. **Breakout Confirmation**: A true 52W high breakout should hold above the level on retest
4. **The 50% Rule**: If price is more than 50% above the 52W low, momentum is likely still bullish
5. **ATH Context**: Stocks making new all-time highs have no overhead resistance - pure blue sky breakouts
6. **Table Color Mode**:
- Use "Relative to Current" to instantly see where you are in each range
- Use "Fixed" mode for traditional high=green, low=red coloring
7. **Declutter**: Use the "Show All Lines" master toggle to quickly hide lines while keeping the table visible
8. **Extended Hours**: Enable for stocks like TSLA/NVDA with significant pre-market gaps
---
### Default Configuration
The indicator comes pre-configured with the most commonly used levels:
- ✅ Today's High/Low
- ✅ Yesterday's High/Low
- ✅ 5-Day High/Low
- ✅ 2-Week High/Low
- ✅ 52-Week High/Low
- ✅ All-Time High/Low
Additional timeframes (4W, 12W, 26W, 104W, and 3 custom) are available but disabled by default to keep the chart clean.
---
### Settings Overview
| Setting | Description |
| ---------------------- | ---------------------------------------- |
| Show All Lines | Master toggle for all lines/labels |
| Label Offset | Distance of lines from chart edge (bars) |
| High/Low/Current Color | Customize level colors |
| Line Style | Solid, Dashed, or Dotted |
| Line Thickness | 1-4 pixels |
| Show Summary Table | Toggle table visibility |
| Table Position | Corner placement |
| Font Size | 1 (Tiny) to 5 (Huge) |
| Value Colors | Relative to Current or Fixed |
| Include Extended Hours | Pre/post market data toggle |
---
### Notes
- Uses daily timeframe data via `request.security()` for accurate historical calculations
- All-Time High/Low is calculated from all available historical data on your chart
- The indicator works on any timeframe chart - the levels are always based on daily data
- For best results, ensure your chart has sufficient historical data loaded
---
## 🔍 SEO-OPTIMIZED TITLE OPTIONS
1. Historical High/Low Levels [Multi-Timeframe Support & Resistance]
2. Historical High/Low Levels - 52W, ATH, Daily Range Visualizer
3. Historical High/Low Levels | Key Price Levels & Ranges
---
## 💬 SUGGESTED FIRST COMMENT (after publishing)
**How I Use This Indicator:**
I built this indicator because I got tired of manually checking 52-week highs, yesterday's range, and other key levels before every trade.
My typical workflow:
1. Add the indicator to any chart
2. Immediately see where current price sits in the daily, weekly, and yearly range
3. Look for confluence zones where multiple timeframes align
4. Use the percentage column to gauge if a move is overextended
The table with "Relative to Current" coloring is my favorite feature - one glance tells me if I'm buying near highs (all green = caution) or near lows (all red = potential opportunity).
Let me know what timeframe combinations work best for your trading style! 🎯
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, תוכל להשתמש בו בחופשיות וללא כל מגבלות – למד עוד כאן
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.
סקריפט מוגן
סקריפט זה פורסם כמקור סגור. עם זאת, תוכל להשתמש בו בחופשיות וללא כל מגבלות – למד עוד כאן
כתב ויתור
המידע והפרסומים אינם מיועדים להיות, ואינם מהווים, ייעוץ או המלצה פיננסית, השקעתית, מסחרית או מכל סוג אחר המסופקת או מאושרת על ידי TradingView. קרא עוד ב־תנאי השימוש.