StockRadar - Mega Trend Indicator

Overview
The Mega Trend Indicator (MTI) is an advanced trend-following indicator that combines Fourier-based trend analysis with adaptive volatility bands to identify strong directional moves and optimal re-entry opportunities. Designed for traders who want to ride major trends while avoiding false signals during weak or choppy market conditions.
Core Features
Fourier-Based Trend Detection
The indicator uses a sophisticated Fourier transformation algorithm that combines multiple harmonic wave components to identify the underlying trend direction. This approach provides:
- Smooth trend identification with reduced noise compared to simple moving averages
- Adaptive sensitivity through harmonic weight adjustments
- Clear visual signals when the trend changes direction (BULLISH/BEARISH labels)
Adaptive Volatility Bands
Dynamic volatility bands are calculated using a combination of ATR (Average True Range) and Standard Deviation, creating context-aware trend boundaries that adapt to current market conditions.
Discount Zones - Smart Re-Entry System
One of the indicator's key features is the Discount Zone system, which identifies potential re-entry areas during pullbacks within an established trend. This allows traders to:
- Enter at better prices during temporary retracements
- Avoid chasing the trend at unfavorable levels
- Get real-time alerts when price enters discount zones
Discount zones are displayed as highlighted areas between the trend line and a calculated support/resistance level, with visual markers (circles) appearing when price enters these zones.
Settings & Customization
Trend Settings
- Price Source: Choose the price data used for calculations (default: Close)
- Fourier Base Period: Base period for trend calculation (default: 14). Higher values = smoother but more lag
- Fourier Smoothing: Additional smoothing layer (default: 7)
- Harmonic Weight: Controls sensitivity of trend detection (0-1, default: 0.5)
Volatility Settings
- Volatility Length: Period for ATR and Standard Deviation calculation (default: 10)
- Volatility Multiplier: Width of trend bands (default: 2.0). Higher = wider bands
- Volatility Smoothing: Smoothing period for volatility (default: 10)
Visual Settings
- Bullish/Bearish Colors: Customize trend colors
- Enable Candle Coloring: Color candles based on trend direction
- Show Trend Change Signals: Display BULLISH/BEARISH labels on trend reversals
Discount Zone Settings
- Show Discount Zones: Toggle discount zone visualization
- Discount Zone ATR Multiplier: Distance from trend line for discount zones (default: 1.5). Lower = tighter zones
- Discount Zone Color: Customize discount zone highlighting
Optional Filters
Volume Confirmation (Default: OFF)
When enabled, discount zones only appear when volume is above average, providing stronger confirmation of re-entry opportunities.
- Volume Average Length: Period for average volume calculation (default: 20)
- Volume Multiplier: Minimum volume threshold (default: 1.2x average)
Trend Strength Filter (Default: OFF)
Prevents re-entries when the trend is weakening, helping avoid entries just before trend reversals. Uses ADX (Average Directional Index) to measure trend strength.
- ADX Length: Period for ADX calculation (default: 14)
- Minimum ADX Threshold: Required trend strength (default: 20.0)
- 15-20: Weak to moderate trends
- 20-25: Moderate to strong trends
- 25+: Very strong trends
Alerts
The indicator provides comprehensive alert functionality:
- Bullish/Bearish Signal Alerts: When the trend changes direction
- Discount Zone Entry Alerts: When price enters a discount zone (with optional filters applied)
Use Cases
- Trend Following: Identify and ride major trends with clear entry and exit signals
- Re-Entry Optimization: Find better entry prices during pullbacks within strong trends
- Trend Reversal Detection: Get early warnings when trends change direction
- Filtered Trading: Use optional filters to reduce false signals in choppy markets
Best Practices
1. Combine with Price Action: Use discount zones as areas of interest, not automatic entry signals
2. Adjust Volatility Multiplier: Tighter markets may need lower multipliers (1.0-1.5), volatile markets may need higher (2.0-3.0)
3. Enable Trend Strength Filter: Recommended for swing trading to avoid weak trends
4. Use Volume Confirmation: Helpful in markets with reliable volume data
5. Timeframe Considerations: Works best on 4H, Daily, and Weekly timeframes for swing trading
Technical Details
- Indicator Type: Overlay
- Pine Script Version: v6
- Calculation Method: Fourier transformation with harmonic wave analysis
- Volatility Method: Adaptive (ATR + Standard Deviation average)
Note: This indicator is designed to complement your trading strategy, not replace proper risk management and analysis. Always use stop-losses and proper position sizing.
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor indicadas a continuación o póngase en contacto directamente con StockradarAI.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.
Instrucciones del autor
Exención de responsabilidad
Script que requiere invitación
Solo los usuarios autorizados por el autor pueden acceder a este script. Deberá solicitar y obtener permiso para utilizarlo. Por lo general, este se concede tras realizar el pago. Para obtener más información, siga las instrucciones del autor indicadas a continuación o póngase en contacto directamente con StockradarAI.
TradingView NO recomienda pagar por un script ni utilizarlo a menos que confíe plenamente en su autor y comprenda cómo funciona. También puede encontrar alternativas gratuitas y de código abierto en nuestros scripts de la comunidad.