Hull Trend Signal Crossover Arrows Smart Filter
- 지표
- 버전: 1.36
Hull Trend Arrows MT5 with Multi-Filter Suite - Technical Documentation
1. Overview and Analytical Purpose
Hull Trend Arrows MT5 with Multi-Filter Suite is an algorithmic technical indicator for MetaTrader 5. It integrates the low-lag calculation engine of the Hull Moving Average (HMA) with fourteen modular confirmation filters to identify directional momentum transitions, calculate inflection points, and display non-repainting entry signals on the chart.
Standard moving averages introduce significant lag with large periods, or generate false oscillations during consolidation with short periods. The Hull Moving Average resolves this by utilizing weighted moving averages with an applied square-root smoothing calculation, minimizing lag while maintaining a smooth directional curve. By coupling this baseline with fourteen independent confirmation filters, the indicator validates momentum triggers across multiple technical dimensions: trend alignment, oscillator momentum, structural support/resistance levels, and dynamic Fibonacci retracements.
The indicator operates strictly on closed historical bars (bar index 1), ensuring that arrow plots and alerts do not recalculate, reposition, or disappear. Directional arrows are plotted directly on the chart above or below trigger candles, providing a systematic visual framework for manual trading and strategy confirmation.
2. Mathematical Operating Principles and Signal Logic
2.1. Hull Moving Average Mathematical Construction:
The Hull Moving Average eliminates lag through a four-step sequence of Weighted Moving Averages (WMA):
- Step 1: Compute WMA over half the specified period: WMA1 = WMA(Price, Period / 2).
- Step 2: Compute WMA over the full specified period: WMA2 = WMA(Price, Period).
- Step 3: Compute raw intermediate series: RawSeries = (2.0 * WMA1) - WMA2.
- Step 4: Compute final smoothed Hull curve: HullMA = WMA(RawSeries, IntegerSquareRoot(Period)).
2.2. Pre-Smoothing Price Pipeline:
Closing prices serve as direct input for WMA calculations. When Use_EMA_Smooth is true, the price series passes through an Exponential Moving Average (EMA) of length EMA_Length prior to WMA processing. This suppresses tick noise on lower timeframes without distorting Hull curvature.
2.3. Fundamental Crossover Conditions:
Baseline directional triggers occur when candle close prices cross the computed Hull Moving Average line:
- Bullish Baseline: Prior candle closed at or below prior Hull, and current candle closes strictly above current Hull: (Price[i-1] <= Hull[i-1]) and (Price[i] > Hull[i]).
- Bearish Baseline: Prior candle closed at or above prior Hull, and current candle closes strictly below current Hull: (Price[i-1] >= Hull[i-1]) and (Price[i] < Hull[i]).
2.4. Non-Repainting Calculation Standard:
- Calculations evaluate completed historical bars starting at index 1 (closed candle).
- On index 0 (open, forming candle), no arrows or alerts are generated.
- Once a candle closes and confirms alignment of core crossover and active filters, the signal arrow is plotted permanently at that bar index.
- Plotted arrow coordinates remain locked in chart history and never shift, recalculate, disappear, or reposition during subsequent price action.
3. Modular Confirmation Filter Suite
Fourteen modular technical filters can be enabled independently or combined:
3.1. RSI Cross Filter: Confirms signals when RSI crosses out of extreme zones (bullish: RSI[i] > Oversold and RSI[i+1] <= Oversold; bearish: RSI[i] < Overbought and RSI[i+1] >= Overbought).
3.2. ADX Trend Strength Filter: Filters out low-volatility ranges by requiring ADX >= ADX_Min_Level.
3.3. Single Moving Average Filter: Enforces trend alignment; buy requires Close[i] > MA[i], sell requires Close[i] < MA[i].
3.4. Ichimoku Senkou Span B Filter: Evaluates cloud equilibrium; buy requires Close[i] > SenkouB[i + Kijun], sell requires Close[i] < SenkouB[i + Kijun].
3.5. RSI 75 Long-Term Trend Filter: Macro trend filter; buy requires RSI 75 > 50.0, sell requires RSI 75 < 50.0.
3.6. Double Moving Average Filter: Dual MA alignment; buy requires Fast MA A > Slow MA B, sell requires Fast MA A < Slow MA B.
3.7. Awesome Oscillator (AO) Suite: Multi-mode oscillator validation:
- AO Volume: Requires histogram value >= AO_Buy_Min for buy, <= AO_Sell_Max for sell.
- AO Color: Requires ascending histogram bars for buy (AO[i] > AO[i+1]), descending for sell (AO[i] < AO[i+1]).
- AO Zero: Requires histogram momentum aligned above zero for buy, or below zero for sell.
3.8. Parabolic SAR Filter: Confirms price positioning; buy requires Close[i] > SAR[i], sell requires Close[i] < SAR[i].
3.9. Synthetic Heiken Ashi Filter: Enforces candle body color; buy requires HA Close > HA Open, sell requires HA Close < HA Open.
3.10. CCI Trend Filter: Measures statistical deviation; buy requires trend CCI > 0, sell requires trend CCI < 0.
3.11. CCI Overbought/Oversold Filter: Breakout trigger; buy requires fast CCI > CCI_Overbought, sell requires fast CCI < CCI_Oversold.
3.12. RVI Trend Filter: Measures energy dispersion; buy requires RVI > 0, sell requires RVI < 0.
3.13. RVI Signal Line Filter: Momentum acceleration; buy requires RVI Main > RVI Signal, sell requires RVI Main < RVI Signal.
3.14. MACD Filter Suite: Dual MACD verification:
- MACD Histogram: Requires histogram difference > 0 for buy, < 0 for sell.
- MACD Zero Level: Requires MACD Main > 0 for buy, < 0 for sell.
3.15. Support and Resistance Filter: Scans SR_Period bars for swing high/low; signals require price testing boundaries within SR_Zone_Points.
3.16. ZigZag Fibonacci Retracement Filter: Computes dynamic Fibonacci levels (Fib_Level_1 and Fib_Level_2) from ZigZag swings; confirms signals testing the retracement zone.
4. Key Features
- Non-Repainting: Evaluated strictly on closed candles (bar 1). Arrows never move, recalculate, or disappear.
- Dual Visual Output: Directional entry arrows with customizable spacing alongside an optional continuous Hull trend line.
- Fourteen Modular Filters: Independent activation for trend, momentum, structural levels, and retracements.
- Signal Spacing Control: MinBarsBetweenSignals prevents consecutive signal crowding during extended directional moves.
- Multi-Channel Alerts: Pop-up alerts, sound notifications, mobile push alerts via MetaQuotes ID, and automated email dispatch.
- Pre-Smoothing Pipeline: Optional EMA filter applied to raw prices reduces high-frequency tick noise.
- Universal Asset Compatibility: Functions on Forex, commodities, indices, metals, energies, and cryptocurrencies.
- Lightweight Execution: Built with native MT5 indicator handles and cached buffers for minimal CPU and RAM load.
5. Operational Recommendations
- Recommended Instruments: Forex pairs (EURUSD, GBPUSD, USDJPY, AUDUSD, NZDUSD, USDCAD, USDCHF, EURJPY, GBPJPY), spot metals (XAUUSD, XAGUSD), crude oil (WTI, Brent), indices (US30, US500, NAS100, GER40), and cryptocurrencies (BTCUSD, ETHUSD).
- Scalping (M1, M5): Set Hull_Length between 20 and 35, enable Use_EMA_Smooth (EMA_Length 3 to 5), and apply ADX Filter (threshold 22) or Heiken Ashi Filter to dampen market noise.
- Day Trading (M15, H1): Set Hull_Length to 50, paired with Single MA (50 SMA) or Double MA (30 EMA / 140 EMA) for trend alignment, alongside RSI Cross Filter (30/70 thresholds).
- Swing Trading (H4, D1): Set Hull_Length to 50 or 80, paired with Ichimoku Senkou Span B Filter, MACD Zero Filter, or ZigZag Fibonacci Filter for structural pullback entries.
- Execution Environment: Compatible with Hedging and Netting accounts. Low-spread ECN accounts are recommended for execution. VPS deployment is advised if utilizing automated push notifications.
6. Operational Trading Setups
- Trend-Following: M15/H1 charts. Mode: Normal; Hull_Length: 50; Use_EMA_Smooth: true (EMA_Length: 5); Use_MA_Filter: true (MA_Period: 100, MODE_EMA); Use_ADX_Filter: true (ADX_Period: 14, Min: 22.0); Use_MACD_Filter: true (12, 26, 9).
- Retracement & Fibonacci: H1/H4 charts. Mode: Normal; Hull_Length: 40; Use_EMA_Smooth: true (EMA_Length: 5); Use_DoubleMA_Filter: true (Fast: 30 EMA, Slow: 140 EMA); Use_Fib_Filter: true (0.382, 0.618, Depth: 12); Use_RSI75_Filter: true (75).
- Volatility Breakout: M5/M15 charts. Mode: Normal; Hull_Length: 30; Use_EMA_Smooth: true (EMA_Length: 3); Use_CCI_OBOS_Filter: true (14, Overbought: 100, Oversold: -100); Use_AO_Filter: true; Use_AO_Volume_Filter: true (Buy: 4.0, Sell: -4.0); Use_SAR_Filter: true (0.02, 0.2).
- Structural Confluence: H1/H4 charts. Mode: Normal; Hull_Length: 50; Use_EMA_Smooth: true (EMA_Length: 5); Use_Ichimoku_Filter: true (SenkouB: 52, Kijun: 26); Use_HeikenAshi_Filter: true; Use_RVI_Filter: true (75); Use_SR_Filter: true (50 bars, 80 points).
7. Complete Input Parameters Documentation
- Mode_Group (Default: '=== HULL MODE ===') -> Header for Hull MA settings.
- Mode (Default: Normal) -> Base calculation mode: Normal (close), Linear, or Heikin_Ashi.
- Hull_Length (Default: 50) -> Bar period for primary Hull Moving Average calculation.
- Use_EMA_Smooth (Default: true) -> Toggles EMA price pre-smoothing prior to Hull calculation.
- EMA_Length (Default: 5) -> Smoothing period applied to price data when pre-smoothing is enabled.
- Arrow_Group (Default: '=== ARROW ===') -> Header for arrow visual settings.
- Arrow_Distance (Default: 20) -> Vertical pixel/point offset separating arrows from candle extremes.
- ShowOnlyClosedBars (Default: true) -> Enforces calculation strictly on completed bars (bar 1).
- MinBarsBetweenSignals (Default: 1) -> Minimum candle separation required between signals.
- Alert_Group (Default: '=== ALERT & NOTIFICATION ===') -> Header for notification settings.
- Use_Alert (Default: true) -> Enables native MT5 on-screen pop-up alert dialogs.
- Use_Sound (Default: true) -> Enables acoustic sound file playback upon signal confirmation.
- Alert_SoundFile (Default: 'alert.wav') -> Audio file name located in the terminal Sounds folder.
- Use_Push (Default: true) -> Sends push notifications to mobile terminals via MetaQuotes ID.
- Use_Email (Default: false) -> Dispatches signal messages via SMTP configured in terminal Options.
- Alert_OnBuy (Default: true) -> Enables alert notifications specifically for bullish buy signals.
- Alert_OnSell (Default: true) -> Enables alert notifications specifically for bearish sell signals.
- Filter_Mode_Group (Default: '=== FILTER MODE ===') -> Header for filter configuration.
- RSI_Group (Default: '=== RSI CROSS FILTER ===') -> Header for RSI Cross settings.
- Use_RSI_Cross_Filter (Default: false) -> Activates RSI boundary crossover confirmation filter.
- RSI_Length (Default: 14) -> Period for standard RSI indicator.
- RSI_Price_Source (Default: PRICE_CLOSE) -> Applied price constant used for RSI calculation.
- Oversold (Default: 30.0) -> Oversold threshold for buy.
- Overbought (Default: 70.0) -> Overbought threshold for sell.
- ADX_Group (Default: '=== ADX FILTER ===') -> Header for ADX settings.
- Use_ADX_Filter (Default: false) -> Activates Average Directional Movement Index strength filter.
- ADX_Period (Default: 10) -> Period for directional movement calculation.
- ADX_Min_Level (Default: 20.0) -> Min trend level for signals.
- MA_Group (Default: '=== SINGLE MA FILTER ===') -> Header for Single MA settings.
- Use_MA_Filter (Default: false) -> Activates directional bias filter relative to a single MA.
- MA_Period (Default: 50) -> Period for moving average computation.
- MA_Method (Default: MODE_SMA) -> Smoothing method: SMA, EMA, SMMA, or LWMA.
- MA_Shift (Default: 0) -> Horizontal bar shift offset for the moving average line.
- Ichimoku_Group (Default: '=== ICHIMOKU SENKOU SPAN B FILTER ===') -> Header for Ichimoku.
- Use_Ichimoku_Filter (Default: false) -> Activates Ichimoku Senkou Span B baseline trend filter.
- Ichimoku_SenkouB (Default: 52) -> Lookback period for Senkou Span B.
- Ichimoku_Kijun (Default: 26) -> Bar shift for Senkou Span B.
- RSI75_Group (Default: '=== RSI 75 FILTER ===') -> Header for RSI 75 settings.
- Use_RSI75_Filter (Default: false) -> Activates long-term baseline RSI directional median filter.
- RSI_Filter_Period (Default: 75) -> Lookback period for baseline RSI computation.
- DoubleMA_Group (Default: '=== DOUBLE MA FILTER ===') -> Header for Double MA settings.
- Use_DoubleMA_Filter (Default: false) -> Activates dual moving average alignment crossover filter.
- MA_A_Period (Default: 30) -> Period of fast moving average line A.
- MA_A_Method (Default: MODE_EMA) -> Smoothing method for moving average A.
- MA_A_Applied (Default: PRICE_CLOSE) -> Applied price for moving average A.
- MA_A_Shift (Default: 0) -> Bar shift for moving average A.
- MA_B_Period (Default: 140) -> Period of slow moving average line B.
- MA_B_Method (Default: MODE_EMA) -> Smoothing method for moving average B.
- MA_B_Applied (Default: PRICE_CLOSE) -> Applied price for moving average B.
- MA_B_Shift (Default: 0) -> Bar shift for moving average B.
- AO_Group (Default: '=== AWESOME OSCILLATOR FILTER ===') -> Header for AO settings.
- Use_AO_Filter (Default: false) -> Activates Awesome Oscillator momentum verification filter.
- Use_AO_Volume_Filter (Default: false) -> Enforces absolute bar magnitude thresholds on AO histogram.
- AO_Buy_Min (Default: 4.0) -> Min positive histogram for buy.
- AO_Sell_Max (Default: -4.0) -> Max negative histogram for sell.
- Use_AO_Color_Filter (Default: false) -> Requires positive bar-to-bar histogram slope acceleration.
- Use_AO_Zero_Filter (Default: false) -> Requires histogram placement and slope to confirm zero polarity.
- SAR_Group (Default: '=== PARABOLIC SAR FILTER ===') -> Header for Parabolic SAR settings.
- Use_SAR_Filter (Default: false) -> Activates Parabolic Stop and Reverse price positioning filter.
- SAR_Step (Default: 0.02) -> Incremental acceleration factor step for SAR computation.
- SAR_Maximum (Default: 0.2) -> Maximum acceleration factor cap for SAR computation.
- HA_Group (Default: '=== HEIKEN ASHI FILTER ===') -> Header for Heiken Ashi settings.
- Use_HeikenAshi_Filter (Default: false) -> Enforces synthetic Heiken Ashi candlestick color consistency.
- CCI_Group (Default: '=== CCI TREND FILTER ===') -> Header for CCI Trend settings.
- Use_CCI_Filter (Default: false) -> Activates Commodity Channel Index zero-line directional filter.
- CCI_Period (Default: 50) -> Period for trend CCI evaluation.
- CCI_Applied (Default: PRICE_CLOSE) -> Price constant applied to trend CCI calculation.
- CCI_OBOS_Group (Default: '=== CCI OB & OS FILTER ===') -> Header for CCI OB/OS settings.
- Use_CCI_OBOS_Filter (Default: false) -> Activates extreme momentum overbought/oversold breakout filter.
- CCI_OBOS_Period (Default: 14) -> Period for momentum oscillator CCI.
- CCI_OBOS_Applied (Default: PRICE_CLOSE) -> Price series constant for momentum CCI.
- CCI_Overbought (Default: 100.0) -> Overbought threshold for buy.
- CCI_Oversold (Default: -100.0) -> Oversold threshold for sell.
- RVI_Group (Default: '=== RVI TREND FILTER ===') -> Header for RVI Trend settings.
- Use_RVI_Filter (Default: false) -> Activates Relative Vigor Index zero-line trend polarity filter.
- RVI_Period (Default: 75) -> Lookback period for trend RVI computation.
- RVI_Signal_Group (Default: '=== RVI SIGNAL FILTER ===') -> Header for RVI Signal settings.
- Use_RVI_Signal_Filter (Default: false) -> Activates Relative Vigor Index main versus signal line filter.
- RVI_Signal_Period (Default: 20) -> Period for fast signal RVI oscillator.
- MACD_Group (Default: '=== MACD SIGNAL FILTER ===') -> Header for MACD settings.
- Use_MACD_Filter (Default: false) -> Activates Moving Average Convergence Divergence histogram filter.
- MACD_FastEMA (Default: 12) -> Fast exponential moving average averaging period.
- MACD_SlowEMA (Default: 26) -> Slow exponential moving average averaging period.
- MACD_SignalSMA (Default: 9) -> Signal line simple moving average smoothing period.
- MACD_Applied (Default: PRICE_CLOSE) -> Price constant applied to MACD calculations.
- MACD_Zero_Group (Default: '=== MACD LEV 0 FILTER ===') -> Header for MACD Zero settings.
- Use_MACD_Zero_Filter (Default: false) -> Enforces MACD main line positioning relative to zero baseline.
- SR_Group (Default: '=== SUPPORT & RESISTANCE FILTER ===') -> Header for Support and Resistance.
- Use_SR_Filter (Default: false) -> Activates dynamic price reaction filter based on swing boundaries.
- SR_Period (Default: 50) -> Lookback candle window to detect local highest high and lowest low.
- SR_Zone_Points (Default: 80) -> Zone width in points around SR levels.
- Fib_Group (Default: '=== FIBONACCI FILTER ===') -> Header for Fibonacci settings.
- Use_Fib_Filter (Default: false) -> Activates ZigZag swing-derived Fibonacci retracement zone filter.
- Fib_Level_1 (Default: 0.382) -> First Fibonacci retracement ratio.
- Fib_Level_2 (Default: 0.618) -> Second Fibonacci retracement ratio.
- ZigZag_Depth (Default: 12) -> Min bar separation for swing detection.
- ZigZag_Deviation (Default: 5) -> Price deviation in points for swings.
- ZigZag_Backstep (Default: 3) -> Lookback bar limit for swing points.
8. Computational Performance and Terminal Resources
- Optimized Native Handles: Utilizes native MT5 functions (iMA, iRSI, iADX, iIchimoku, iAO, iSAR, iCCI, iRVI, iMACD). Indicator handles are initialized only for active filters during OnInit, releasing all resources upon OnDeinit.
- Incremental Execution: On live ticks, calculations update only the forming bar and the latest completed bar (prev_calculated - 2), keeping CPU overhead negligible.
- Custom Plot Display: Three plot buffers are configurable via the Colors tab: Buy Arrow (DRAW_ARROW, index 233, default Lime), Sell Arrow (DRAW_ARROW, index 234, default Red), and Hull Line (DRAW_LINE, default Aqua).
9. Alert and Notification System
- Pop-Up Alert (Use_Alert): Displays modal terminal message box showing symbol, timeframe, direction, and close price.
- Sound Alert (Use_Sound): Plays audio file alert.wav located in the terminal Sounds folder.
- Mobile Push Notification (Use_Push): Sends push notifications to mobile terminals via MetaQuotes ID.
- Email Notification (Use_Email): Dispatches signal emails via SMTP configured in Tools > Options > Email.
- Directional Controls: Independent toggles (Alert_OnBuy / Alert_OnSell) allow selective filtering of signal alerts.
10. Risk Disclaimer
Trading foreign exchange, commodities, indices, and digital currencies involves substantial risk of loss and is not suitable for all investors. Market volatility can cause losses exceeding initial deposits. Past performance and backtests do not guarantee future outcomes. This software is an analytical technical indicator designed to assist traders in market evaluation. It does not provide investment advice or financial guarantees. Users should evaluate indicator behavior thoroughly on a demo account before live deployment.
