OPEN-SOURCE SCRIPT
Cập nhật

Aroon | TR

65
🎯 Overview
Aroon | TR is a versatile trend-following indicator that measures the time elapsed since price recorded its highest high and lowest low over a specified period. Developed by Tiagorocha1989, this enhanced version of Tushar Chande's classic Aroon indicator offers multiple visualization modes, customizable moving averages, and comprehensive visual features to help traders identify trend direction, trend strength, and potential reversal points with greater precision.

🔧 How It Works
The Aroon indicator consists of two lines: Aroon Up and Aroon Down. These lines measure how many periods have passed since price recorded a high or low within the lookback period. The relationship between these lines determines trend direction and strength.

Core Calculation Logic:
The indicator calculates the Aroon lines using the following logic:

Aroon Up: Measures the number of periods since the highest high within the lookback period

Formula: 100 × (Length - Periods Since Highest High) / Length

Aroon Down: Measures the number of periods since the lowest low within the lookback period

Formula: 100 × (Length - Periods Since Lowest Low) / Length

Both lines oscillate between 0 and 100, with:

Values above 50 indicating a recent high/low (strong trend)

Values approaching 100 indicating a very recent high/low (very strong trend)

Values approaching 0 indicating no recent high/low (weak or reversing trend)

The indicator also calculates Aroon as the difference between Aroon Up and Aroon Down (Aroon Up minus Aroon Down), creating an oscillator that oscillates around zero:

Positive Aroon values → Bullish momentum (Aroon Up above Aroon Down)

Negative Aroon values → Bearish momentum (Aroon Down above Aroon Up)

✨ Key Features
🔹 Multiple Display Modes
Average Aroon Mode: Shows the Aroon oscillator (Aroon Up minus Aroon Down) with signal line, providing a clean, oscillator-style view of trend strength and direction

Normal Aroon Mode: Displays the classic Aroon Up and Aroon Down lines for traditional analysis

Both modes can be combined for comprehensive analysis

🔹 Dual Operating Modes for Signals
Zero Line Mode: Signals occur when the Aroon oscillator crosses above or below the zero line

Aroon MA Mode: Enhanced mode where signals occur when Aroon crosses its own moving average, providing filtered entries

🔹 Flexible Moving Average Selection
Choose from six MA types for the Aroon MA mode:

EMA (Exponential Moving Average) for responsive signals

SMA (Simple Moving Average) for smoother readings

RMA (Rolling Moving Average) for weighted recent data

WMA (Weighted Moving Average) for customizable weighting

VWMA (Volume-Weighted Moving Average) incorporating volume

HMA (Hull Moving Average) for reduced lag

🔹 Customizable Aroon Parameters
Length Aroon: Lookback period for Aroon calculation (default 6)

Shorter periods (like 6) provide more responsive signals

Longer periods (like 14-25) provide smoother, more reliable signals

🔹 Customizable Color Themes
Eight distinct color schemes to match your charting preferences:

Classic – Green for bullish, Red for bearish

Modern – White for bullish, Purple for bearish

Robust – Amber for bullish, Maroon for bearish

Accented – Violet for bullish, Pink for bearish

Monochrome – Light gray for bullish, Dark gray for bearish

Moderate – Green for bullish, Red for bearish

Aqua – Blue for bullish, Orange for bearish

Cosmic – Pink for bullish, Purple for bearish

🔹 Comprehensive Visual Feedback
Aroon Oscillator: Colored line showing the difference between Aroon Up and Aroon Down

Signal Line: Yellow line for MA-based signals

Gradient Fill Zones: Clear visualization of extreme readings (+100 to -100)

Dynamic Zone Fills: Semi-transparent fills showing when Aroon is above or below the signal line

Aroon Up and Aroon Down Lines: Optional display of classic Aroon lines

Color-Coded Candles: Bars reflect current trend direction based on Aroon Up/Aroon Down relationship

Signal Markers: Triangle up/down symbols at crossover points

Live Value Display: Floating labels showing current values for each enabled component

Trend Table: Bullish/Bearish status displayed on the chart

🔹 Ready-to-Use Alerts
Built-in alert conditions trigger LONG signals when Aroon Up crosses above Aroon Down, and SHORT signals when Aroon Up crosses below Aroon Down.

⚙️ Settings Summary
Color Choice: Select from eight visual themes (Default: Classic)

Length Aroon: Lookback period for Aroon calculation (Default: 6)

Average Aroon: Toggle to show the Aroon oscillator (Aroon Up minus Aroon Down) (Default: Enabled)

Aroon: Toggle to show classic Aroon Up and Aroon Down lines (Default: Disabled)

Entry/Exit Signal: Choose between zero line or Aroon MA mode (Default: Zero Line)

Length MA: Moving average period for Aroon MA mode (Default: 365)

Aroon MA Type: Moving average method for signal line (Default: EMA)

📈 Practical Applications
🔹 Trend Direction Identification
The primary use of the Aroon system is identifying trend direction:

Aroon Up above Aroon Down → Bullish trend

Aroon Down above Aroon Up → Bearish trend

The wider the separation, the stronger the trend

🔹 Trend Strength Measurement
The actual values of Aroon Up and Aroon Down indicate trend strength:

Values above 70 → Strong trend (recent high/low)

Values between 50-70 → Moderate trend

Values below 30 → Weak trend or consolidation

Both lines below 50 → Possible ranging market

🔹 Trend Initiation Detection
When Aroon Up crosses above Aroon Down from below, it suggests a new uptrend is beginning. Conversely, when Aroon Down crosses above Aroon Up, it suggests a new downtrend is beginning.

🔹 Trend Exhaustion Signals
When Aroon Up is very high (above 80-90) and begins to turn down while Aroon Down remains low, it may indicate an uptrend is tiring. The opposite signals downtrend exhaustion.

🔹 Consolidation Identification
When both Aroon lines are low (below 30-40) and moving horizontally, it suggests a consolidation phase with no clear trend.

🔹 Aroon Oscillator Analysis
The Aroon oscillator (Aroon Up minus Aroon Down) offers additional insights:

Positive values indicate bullish dominance

Negative values indicate bearish dominance

Crossovers of the zero line confirm trend changes

Crossovers of the moving average provide filtered signals

🔹 Multiple Timeframe Confirmation
Compare Aroon readings across different timeframes:

Higher timeframe Aroon confirms primary trend direction

Lower timeframe Aroon identifies entry timing

🎯 Ideal For
✅ Trend Traders seeking early identification of new trends

✅ Swing Traders wanting to capture trend initiations and reversals

✅ Range-Bound Traders identifying consolidation phases

✅ System Developers needing reliable trend direction signals

✅ Multi-Timeframe Analysts comparing trend strength across periods

📌 Key Takeaways
Time-Based Approach: Unlike most indicators that use price or volume, Aroon uniquely measures time since significant highs and lows

Multiple Display Modes: Choose between classic Aroon Up/Down lines or the Aroon oscillator based on your analysis style

Dual-Mode Signal Generation: Zero line crossovers for classic signals or MA-smoothed signals for filtered entries

Rich Visual Feedback: Color themes, gradient fills, candles, and floating labels provide immediate market awareness

Alert-Ready: Built-in alerts for trend change signals when Aroon Up crosses Aroon Down

⚠️ Important Notes
The Aroon indicator works best in trending markets and can produce false signals in ranging conditions. The default length of 6 makes this version very responsive to recent price action, ideal for shorter-term trading. For longer-term analysis, consider increasing the length to 14-25. The 365-day MA default in Aroon MA mode is designed for longer-term trend context on daily charts. Both lines below 50 often indicate consolidation - consider avoiding trend signals in these conditions. Always combine with proper risk management and additional confirmation for best results.

Disclaimer: This indicator is provided for educational and informational purposes only. Past performance is not indicative of future results. Always conduct thorough testing and align with your risk management strategy before live deployment.
Phát hành các Ghi chú
Resolution Previous Problem

Thông báo miễn trừ trách nhiệm

Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.