Spectra Trend Ribbon
- Indicators
-
Syarief Azman Bin Rosli
Hello and welcome to my official MQL5 profile!
I am Syarief Azman Bin Rosli, an algorithmic trading systems developer and quantitative software engineer with over a decade of specialized experience creating robust automated trading solutions for MetaTrader 5 and MetaTrader 4. - Version: 1.0
- Activations: 20
Spectra Trend Ribbon is a multi-tier trend direction and volatility expansion indicator developed natively for MetaTrader 5. It combines an adaptive smoothed central trend baseline with dynamic volatility envelope bands and automated momentum breakout signals.
Understanding the Visual Signals:
1. Central Adaptive Baseline (Color Line)
- Green Color: Indicates that the market price is trading above the baseline and the baseline slope is positive, representing an active bullish trend regime.
- Red Color: Indicates that the market price is trading below the baseline and the baseline slope is negative, representing an active bearish trend regime.
- Gray Color: Indicates a flat slope or consolidation phase where directional momentum is neutral.
2. Upper and Lower Volatility Bands (Royal Blue Lines)
- Outer envelope boundaries computed by multiplying Average True Range (ATR) values against the central baseline.
- When price trades within the bands, the market is in a normal volatility condition.
- When the bands narrow, it signals a volatility compression (squeeze).
3. Bullish Expansion Arrow (Green Arrow)
- Appears beneath the price candle when a bar breaks and closes above the upper volatility band with an active bullish baseline slope.
- Signifies momentum re-expansion out of a consolidation phase in the direction of the uptrend.
4. Bearish Expansion Arrow (Red Arrow)
- Appears above the price candle when a bar breaks and closes below the lower volatility band with an active bearish baseline slope.
- Signifies momentum re-expansion out of a consolidation phase in the direction of the downtrend.
5. On-Chart HUD Dashboard
- Displays the current market regime status, instantaneous ATR reading, baseline numerical price, and upper/lower band coordinates.
Operational & Performance Architecture:
- Optimized Calculation Loop: Implements historical delta caching (rates_total - prev_calculated). Does not recalculate historical chart bars on incoming ticks.
- Zero External DLLs: 100% native MQL5 source code compliant with MQL5 Market automated validation requirements.
- Resource Safety: Explicit handle deallocation using IndicatorRelease() and clean chart object removal in OnDeinit().
- Alert System: Optional audio and native terminal popup alerts triggered upon confirmed breakout bar completion.
Recommended Chart Setup:
- Instruments: Forex majors (EURUSD, GBPUSD, USDJPY), equity indices (US30, NAS100), and Commodities (XAUUSD).
- Timeframes: M5, M15, H1, and H4.
- Application: Suitable for trend-following entries, breakout confirmation, and trailing stop references along the adaptive baseline.
Input Parameters:
- Baseline Smoothing Period: Lookback length used for central baseline calculation.
- Adaptive Factor: Responsiveness multiplier for market momentum adaptations.
- Applied Price: Price point applied to calculations (Default: Typical Price).
- ATR Volatility Period: Period of the underlying Average True Range calculation.
- Outer Volatility Multiplier: Standard multiplier for outer band width.
- Squeeze Ratio: Ratio threshold defining narrow volatility conditions.
- Display Signal Arrows: Toggles the rendering of breakout arrows on the chart.
- Audio Notification on Breakout: Plays a notification tone on signal emergence.
- Native Alert Popup on Breakout: Triggers the MetaTrader terminal alert window.
- Show Visual HUD Dashboard: Toggles display of the dashboard widget.
- HUD Accent Color: Primary theme accent color.
- HUD Text Color: Font color for metrics and status descriptions.
Risk Disclaimer:
Technical indicators are analytical decision-support tools and do not constitute financial advice. Past chart patterns do not ensure future price continuation. Evaluate all signals within a comprehensive risk management strategy.
