OPEN-SOURCE SCRIPT
Multitime ATR with ATR Heat Line

# Multi-Timeframe ATR Supertrend with ATH Finder
## Overview
This advanced Pine Script indicator combines multi-timeframe ATR-based Supertrend analysis with an All-Time High (ATH) tracking system. Designed for swing traders who need comprehensive trend analysis across multiple timeframes while monitoring key price levels.
## Key Features
### 1. Multi-Timeframe ATR Supertrend (1H, 4H, 1D)
- **1 Hour Supertrend** (Blue): Short-term trend identification
- **4 Hour Supertrend** (Purple): Medium-term trend confirmation
- **1 Day Supertrend** (Green/Red): Primary trend direction
- Each timeframe displays independent trend lines with customizable colors and visibility
### 2. Dual ATR Data System (1D Only)
- **Previous Day ATR** (lookahead_off): Used for main ATR lines - enables pre-market study and avoids intraday crossover issues
- **Current Day ATR** (lookahead_on): Used for Overheating Line calculation - provides real-time profit-taking signals
### 3. Overheating Line
- Dynamically calculated as: `1D ATR + (ATR Width × 1.3)`
- Orange line indicating potential overextension zones
- Uses current day real-time ATR for intraday decision-making
- Only displays during uptrends
- Customizable multiplier (default: 1.3)
### 4. ATH (All-Time High) Finder
- Automatically tracks and displays the all-time high with a horizontal line
- **Line Color**: Lime green (customizable)
- **Label System**:
- Green label when price is at ATH
- Red label when ATH is historical
- Toggle label visibility independently
- **Bug Fix**: Prevents vertical line display when ATH occurs on current bar
- Line extends to the right for easy visualization
### 5. Warning & Break Signals
Each timeframe provides two types of alerts:
- **Warning Signal** (⚠️): Price closes below uptrend line (potential reversal warning)
- **Break Signal** (⚡): Price closes above downtrend line (potential breakout)
- Smart timing intervals prevent signal spam:
- 1H: Checks every 4 hours (warning) / 1 hour (break)
- 4H/1D: Max 2 signals per day
### 6. Trend Change Indicators
- Small circles mark the exact bar where trend changes occur
- Color-coded for each timeframe
- Helps identify reversal points and trend strength
### 7. Master Control Switches
Efficiently manage all visual elements:
- **Master Highlighter**: Toggle all background fills on/off
- **Master Signals**: Toggle all warning/break signals
- **Master Up Trend**: Toggle all uptrend lines and circles
- **Master Down Trend**: Toggle all downtrend lines and circles
### 8. Fast Cut Lines (Optional)
- Additional support/resistance lines offset by a percentage from main ATR lines
- Useful for tighter stop-loss management
- Separate controls for up and down trends
- Default: OFF (customizable offset percentage)
### 9. Timeframe Visibility Control
- **Hide on Daily+**: Automatically hides indicators (except 1D ATR) on daily timeframes and above
- Reduces chart clutter on higher timeframes
- 1D ATR always visible regardless of chart timeframe
### 10. EMA Integration (Optional)
- Display 20/50/200 EMAs for confluence with ATR trends
- Toggle on/off independently
## Use Cases
### For Swing Traders
1. **Entry Timing**: Wait for multiple timeframe alignment (1H, 4H, 1D all in uptrend)
2. **Trend Confirmation**: Use trend change circles to identify momentum shifts
3. **Profit Taking**: Monitor Overheating Line for potential exit zones
### For Position Management
1. **Stop Loss Placement**: Use 1D ATR line or Fast Cut lines as dynamic stop levels
2. **Risk Assessment**: Distance between timeframe ATR lines indicates volatility
3. **Breakout Trading**: Break signals (⚡) identify potential breakout opportunities
### For Pre-Market Analysis
- 1D ATR uses previous day data, allowing traders to:
- Study support/resistance levels before market open
- Plan entry/exit strategies based on confirmed data
- Avoid false signals from incomplete daily candles
## Settings Guide
### ATH Finder Settings
- **Show ATH Line**: Toggle ATH line visibility
- **Show ATH Label**: Toggle ATH label display (can hide label while keeping line)
- **ATH Line Color**: Customize line color (default: lime)
- **ATH Line Width**: Adjust line thickness (1-5)
### Timeframe Settings (Each timeframe has independent controls)
- **ATR Period**: Lookback period for ATR calculation (default: 10)
- **ATR Multiplier**: Distance multiplier from price (default: 1.0)
- **Show Label**: Display "[1H ATR]" / "[4H ATR]" / "[1D ATR]" text labels
- **Show Warning/Break Signals**: Toggle alert symbols
- **Highlighter**: Toggle background fill between price and ATR line
### Overheating Line Settings
- **Show Overheating Line**: Toggle visibility
- **Overheating Multiplier**: Adjust distance above 1D ATR (default: 1.3)
### Cut Lines Settings
- **Show Fast Cut Line (Up/Down)**: Toggle visibility
- **Fast Cut Offset %**: Percentage distance from ATR lines (default: 1.0%)
## Color Scheme
- **Current TF**: Green (up) / Red (down)
- **1H ATR**: Blue (#1848cc) / Dark Blue (#210ba2)
- **4H ATR**: Purple (#7b1fa2) / Dark Purple (#4e0f60)
- **1D ATR**: Green (#4caf50) / Dark Red (#8c101a)
- **Overheating Line**: Orange (#ff9800)
- **ATH Line**: Lime (customizable)
## Technical Notes
### ATR Calculation
- Uses True Range for volatility measurement
- Option to switch between SMA and EMA calculation methods
- Adapts to both volatile and stable market conditions
### Performance Optimization
- Maximum 500 lines and 500 labels to prevent memory issues
- Bar index limitations prevent historical data errors
- Efficient repainting prevention for 1D timeframe
### Alert System
Built-in alert conditions for:
- Buy/Sell signals (Current TF)
- Warning signals (all timeframes)
- Break signals (all timeframes)
## Best Practices
1. **Multiple Timeframe Confirmation**: Don't trade against higher timeframe trends
2. **Overheating Awareness**: Consider profit-taking when price reaches orange line
3. **ATH Monitoring**: Exercise caution near all-time highs (increased volatility risk)
4. **Signal Filtering**: Use warning signals as alerts, not immediate action triggers
5. **Stop Loss Management**: Place stops below the most relevant ATR line for your timeframe
## Version Information
- Pine Script Version: 5
- Indicator Type: Overlay
- Max Lines: 500
- Max Labels: 500
## Credits
Created by yohei ogura with <3
Modified for Multi-Timeframe functionality with ATH tracking
## Overview
This advanced Pine Script indicator combines multi-timeframe ATR-based Supertrend analysis with an All-Time High (ATH) tracking system. Designed for swing traders who need comprehensive trend analysis across multiple timeframes while monitoring key price levels.
## Key Features
### 1. Multi-Timeframe ATR Supertrend (1H, 4H, 1D)
- **1 Hour Supertrend** (Blue): Short-term trend identification
- **4 Hour Supertrend** (Purple): Medium-term trend confirmation
- **1 Day Supertrend** (Green/Red): Primary trend direction
- Each timeframe displays independent trend lines with customizable colors and visibility
### 2. Dual ATR Data System (1D Only)
- **Previous Day ATR** (lookahead_off): Used for main ATR lines - enables pre-market study and avoids intraday crossover issues
- **Current Day ATR** (lookahead_on): Used for Overheating Line calculation - provides real-time profit-taking signals
### 3. Overheating Line
- Dynamically calculated as: `1D ATR + (ATR Width × 1.3)`
- Orange line indicating potential overextension zones
- Uses current day real-time ATR for intraday decision-making
- Only displays during uptrends
- Customizable multiplier (default: 1.3)
### 4. ATH (All-Time High) Finder
- Automatically tracks and displays the all-time high with a horizontal line
- **Line Color**: Lime green (customizable)
- **Label System**:
- Green label when price is at ATH
- Red label when ATH is historical
- Toggle label visibility independently
- **Bug Fix**: Prevents vertical line display when ATH occurs on current bar
- Line extends to the right for easy visualization
### 5. Warning & Break Signals
Each timeframe provides two types of alerts:
- **Warning Signal** (⚠️): Price closes below uptrend line (potential reversal warning)
- **Break Signal** (⚡): Price closes above downtrend line (potential breakout)
- Smart timing intervals prevent signal spam:
- 1H: Checks every 4 hours (warning) / 1 hour (break)
- 4H/1D: Max 2 signals per day
### 6. Trend Change Indicators
- Small circles mark the exact bar where trend changes occur
- Color-coded for each timeframe
- Helps identify reversal points and trend strength
### 7. Master Control Switches
Efficiently manage all visual elements:
- **Master Highlighter**: Toggle all background fills on/off
- **Master Signals**: Toggle all warning/break signals
- **Master Up Trend**: Toggle all uptrend lines and circles
- **Master Down Trend**: Toggle all downtrend lines and circles
### 8. Fast Cut Lines (Optional)
- Additional support/resistance lines offset by a percentage from main ATR lines
- Useful for tighter stop-loss management
- Separate controls for up and down trends
- Default: OFF (customizable offset percentage)
### 9. Timeframe Visibility Control
- **Hide on Daily+**: Automatically hides indicators (except 1D ATR) on daily timeframes and above
- Reduces chart clutter on higher timeframes
- 1D ATR always visible regardless of chart timeframe
### 10. EMA Integration (Optional)
- Display 20/50/200 EMAs for confluence with ATR trends
- Toggle on/off independently
## Use Cases
### For Swing Traders
1. **Entry Timing**: Wait for multiple timeframe alignment (1H, 4H, 1D all in uptrend)
2. **Trend Confirmation**: Use trend change circles to identify momentum shifts
3. **Profit Taking**: Monitor Overheating Line for potential exit zones
### For Position Management
1. **Stop Loss Placement**: Use 1D ATR line or Fast Cut lines as dynamic stop levels
2. **Risk Assessment**: Distance between timeframe ATR lines indicates volatility
3. **Breakout Trading**: Break signals (⚡) identify potential breakout opportunities
### For Pre-Market Analysis
- 1D ATR uses previous day data, allowing traders to:
- Study support/resistance levels before market open
- Plan entry/exit strategies based on confirmed data
- Avoid false signals from incomplete daily candles
## Settings Guide
### ATH Finder Settings
- **Show ATH Line**: Toggle ATH line visibility
- **Show ATH Label**: Toggle ATH label display (can hide label while keeping line)
- **ATH Line Color**: Customize line color (default: lime)
- **ATH Line Width**: Adjust line thickness (1-5)
### Timeframe Settings (Each timeframe has independent controls)
- **ATR Period**: Lookback period for ATR calculation (default: 10)
- **ATR Multiplier**: Distance multiplier from price (default: 1.0)
- **Show Label**: Display "[1H ATR]" / "[4H ATR]" / "[1D ATR]" text labels
- **Show Warning/Break Signals**: Toggle alert symbols
- **Highlighter**: Toggle background fill between price and ATR line
### Overheating Line Settings
- **Show Overheating Line**: Toggle visibility
- **Overheating Multiplier**: Adjust distance above 1D ATR (default: 1.3)
### Cut Lines Settings
- **Show Fast Cut Line (Up/Down)**: Toggle visibility
- **Fast Cut Offset %**: Percentage distance from ATR lines (default: 1.0%)
## Color Scheme
- **Current TF**: Green (up) / Red (down)
- **1H ATR**: Blue (#1848cc) / Dark Blue (#210ba2)
- **4H ATR**: Purple (#7b1fa2) / Dark Purple (#4e0f60)
- **1D ATR**: Green (#4caf50) / Dark Red (#8c101a)
- **Overheating Line**: Orange (#ff9800)
- **ATH Line**: Lime (customizable)
## Technical Notes
### ATR Calculation
- Uses True Range for volatility measurement
- Option to switch between SMA and EMA calculation methods
- Adapts to both volatile and stable market conditions
### Performance Optimization
- Maximum 500 lines and 500 labels to prevent memory issues
- Bar index limitations prevent historical data errors
- Efficient repainting prevention for 1D timeframe
### Alert System
Built-in alert conditions for:
- Buy/Sell signals (Current TF)
- Warning signals (all timeframes)
- Break signals (all timeframes)
## Best Practices
1. **Multiple Timeframe Confirmation**: Don't trade against higher timeframe trends
2. **Overheating Awareness**: Consider profit-taking when price reaches orange line
3. **ATH Monitoring**: Exercise caution near all-time highs (increased volatility risk)
4. **Signal Filtering**: Use warning signals as alerts, not immediate action triggers
5. **Stop Loss Management**: Place stops below the most relevant ATR line for your timeframe
## Version Information
- Pine Script Version: 5
- Indicator Type: Overlay
- Max Lines: 500
- Max Labels: 500
## Credits
Created by yohei ogura with <3
Modified for Multi-Timeframe functionality with ATH tracking
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.
Skrip sumber terbuka
Dalam semangat TradingView sebenar, pencipta skrip ini telah menjadikannya sumber terbuka, jadi pedagang boleh menilai dan mengesahkan kefungsiannya. Terima kasih kepada penulis! Walaupuan anda boleh menggunakan secara percuma, ingat bahawa penerbitan semula kod ini tertakluk kepada Peraturan Dalaman.
Penafian
Maklumat dan penerbitan adalah tidak bertujuan, dan tidak membentuk, nasihat atau cadangan kewangan, pelaburan, dagangan atau jenis lain yang diberikan atau disahkan oleh TradingView. Baca lebih dalam Terma Penggunaan.