ATR extensions TV script

ALEX - ATR Extensions + ADR + Table
Overview The ALEX ATR Extensions indicator is a comprehensive volatility and momentum analysis tool that combines Average True Range (ATR), Average Daily Range (ADR), and moving average distance calculations in a single, customizable display. This indicator helps traders assess current price action relative to historical volatility and key moving averages, providing crucial context for risk management and trade planning.
Key Features
Multi-Metric Analysis
ATR Percentage: Current ATR as a percentage of price for volatility assessment
ADR Percentage: Average Daily Range as a percentage for typical daily movement
Low of Day Distance: Distance from current price to daily low
Moving Average Distance: ATR-normalized distance from 21 and 50 period moving averages
Flexible Moving Average Options
Configurable MA Types: Choose between EMA or SMA for both 21 and 50 period averages
Customizable Periods: Adjust moving average lengths to suit your trading style
Daily Timeframe Data: Uses daily moving averages regardless of chart timeframe
ATR Extension Levels
Dynamic Price Targets: Calculate extension levels based on ATR multiples from moving averages
Visual Reference Lines: Optional overlay lines showing ATR extension targets
Customizable Multipliers: Adjust ATR multipliers for different risk/reward scenarios
Smart Visual Alerts
Color-Coded Distance Metrics: Automatic color changes based on distance thresholds
Symbol Plotting: Customizable chart symbols when distance thresholds are exceeded
Threshold-Based Alerts: Visual cues when price reaches significant ATR distances
Comprehensive Data Table
Real-Time Metrics: Live updating table with all key measurements
Customizable Display: Toggle individual metrics on/off based on preference
Professional Styling: Adjustable colors, fonts, and transparency
How to Use
Volatility Assessment
High ATR%: Indicates elevated volatility, larger position sizing considerations
Low ATR%: Suggests compressed volatility, potential for expansion
ADR% Comparison: Compare current day's range to historical average
Moving Average Analysis
ATR Distance 21/50: Normalized distance showing how extended price is from key levels
Positive Values: Price above moving average (bullish positioning)
Negative Values: Price below moving average (bearish positioning)
Color Changes: Automatic alerts when reaching threshold levels
Extension Target Planning
ATR Extension Lines: Visual price targets based on volatility-adjusted projections
Risk/Reward Planning: Use extension levels for profit target placement
Breakout Confirmation: Extension levels can confirm breakout validity
Symbol Alert System
Chart Symbols: Automatic plotting when distance thresholds are breached
Customizable Triggers: Set your own threshold levels for alerts
Visual Scanning: Quick identification of extended conditions across multiple charts
Settings
Display Controls
Show ADR%: Toggle average daily range percentage display
Show ATR%: Toggle average true range percentage display
Show LoD Distance: Toggle low of day distance calculation
Show LoD Price: Toggle actual low of day price display
Show ATR Distance from 21/50 DMA: Toggle moving average distance metrics
Show 21/50 DMA Price: Toggle actual moving average price display
Show ATR Extension Levels: Toggle extension target display in table
Moving Average Configuration
21/50 DMA Type: Choose between EMA or SMA calculation methods
21/50 DMA Period: Customize moving average lengths
ADR/ATR Length: Adjust calculation periods for range measurements
Color Thresholds
Threshold Levels: Set distance levels for color changes (default 2.0 and 5.0)
Custom Colors: Choose colors for different threshold breaches
Separate 21/50 Settings: Independent color schemes for each moving average
Symbol Settings
Show Char Symbol: Toggle symbol plotting for each moving average
Custom Symbols: Choose any character for chart plotting
Symbol Colors: Customize colors for visual distinction
Threshold Levels: Set trigger points for symbol appearance
ATR Extension Lines
Show Extension Lines: Toggle visual extension level lines
ATR Multipliers: Customize extension distance (default 2.0x)
Line Colors: Choose colors for extension level visualization
Table Customization
Background Color: Adjust table transparency and color
Text Color: Customize default text appearance
Font Size: Choose from tiny to huge font options
Advanced Applications
Trend Strength Analysis
Large ATR distances suggest strong trending moves
Small ATR distances indicate potential consolidation or reversal zones
Compare current readings to recent historical ranges
Risk Management
Use ATR% for position sizing calculations
Extension levels provide natural profit target zones
Distance metrics help identify overextended conditions
Multi-Timeframe Context
Apply to different timeframes for comprehensive analysis
Daily data provides consistency across all chart intervals
Combine with weekly/monthly analysis for broader context
Market Regime Identification
High volatility periods: Increased ATR% readings
Low volatility periods: Compressed ATR% readings
Trending markets: Sustained high distance readings
Consolidating markets: Low distance readings with frequent color changes
Best Practices
Volatility-Adjusted Trading
Increase position sizes during low volatility periods
Reduce position sizes during high volatility periods
Use ATR% for stop-loss placement relative to normal market movement
Extension Level Usage
Primary targets: 1.5-2.0x ATR extensions
Secondary targets: 2.5-3.0x ATR extensions
Avoid chasing prices beyond 3x ATR extensions
Threshold Optimization
Backtest different threshold levels for your trading style
Consider market conditions when setting alert levels
Adjust thresholds based on instrument volatility characteristics
Integration Strategies
Combine with momentum indicators for confirmation
Use alongside support/resistance levels
Incorporate into systematic trading approaches
Technical Specifications
Compatible with Pine Script v6
Uses daily timeframe data for consistency
Optimized for real-time performance
Works on all chart types and timeframes
Supports all tradeable instruments
Ideal For
Swing traders using daily charts
Position traders seeking volatility context
Day traders needing intraday reference levels
Risk managers requiring volatility metrics
Systematic traders building rule-based strategies
Disclaimer This indicator is for educational and informational purposes only. It should not be used as the sole basis for trading decisions. Always combine with other forms of analysis, proper risk management techniques, and consider your individual trading plan and risk tolerance. Past performance does not guarantee future results.
Last updated