Heiken Ashi No Wick Signal Filter Arrows NoRepaint
- Indicators
- Version: 3.17
HA Signal MultiFilter MT5 - Technical Operational Manual & Architecture Guide
1. SYSTEM OVERVIEW & ARCHITECTURAL FOUNDATION
HA Signal MultiFilter MT5 is a specialized analytical indicator developed for MetaTrader 5 terminal to identify directional momentum expansions and structural trend continuations[cite: 2]. By synthesizing smoothed Heiken Ashi candlestick price discovery with a modular 15-layer secondary confirmation filter suite, the system extracts high-probability market shifts while filtering out low-volume consolidation noise[cite: 1, 2]. The program operates within the main chart window across 7 native indicator buffers: Buffers 0 to 3 calculate the Heiken Ashi geometric coordinates (HA Open, HA High, HA Low, HA Close), Buffer 4 handles directional candlestick color indexing, and Buffers 5 and 6 plot discrete numeric values for confirmed Buy and Sell arrow signals, allowing full integration with automated Expert Advisors via the MQL5 iCustom function[cite: 2].
2. MATHEMATICAL CALCULATION & NON-REPAINTING LOGIC
The indicator operates on a closed-bar execution model that prevents signal repainting[cite: 1, 2]. Candle geometry is calculated as follows:
- HAClose = (Open + High + Low + Close) / 4.0, representing the synthetic closing price of the period[cite: 2].
- HAOpen = (HAOpen[previous] + HAClose[previous]) / 2.0, forming a recursive midpoint anchored to prior momentum[cite: 2].
- HAHigh = MathMax(High, MathMax(HAOpen, HAClose)), establishing the upper extreme price boundary[cite: 2].
- HALow = MathMin(Low, MathMin(HAOpen, HAClose)), establishing the lower extreme price boundary[cite: 2].
A candle is classified as Bullish (Color 0) when HAClose > HAOpen, and Bearish (Color 1) when HAClose <= HAOpen[cite: 2]. The algorithm scans historical bars sequentially up to index (rates_total - 2)[cite: 2]. Bar index (rates_total - 1), representing the live forming candle, is calculated strictly for visual geometry without generating arrow signals or alert dispatches[cite: 1, 2]. Once candle (rates_total - 2) completes and its closing price is recorded by the broker feed, calculation values lock permanently[cite: 1, 2]. Signals never shift, alter location, or disappear on historical data[cite: 1, 2].
3. ENTRY SIGNAL VALIDATION & FLAT-WICK MECHANICS
Execution requires both structural candlestick criteria and active technical filter conditions to be met simultaneously[cite: 1, 2]:
- Directional Color Transition: A Bullish transition occurs when the prior candle closed bearish and the current closed candle turns bullish, setting waitingBull to true[cite: 2]. A Bearish transition occurs when the prior candle closed bullish and the current closed candle turns bearish, setting waitingBear to true[cite: 2].
- Flat-Wick Geometry (Headless Candles): Signals enforce strict directional candle expansion[cite: 2]. Buy signals require NormalizeDouble(HALow[i], _Digits) == NormalizeDouble(HAOpen[i], _Digits), confirming zero lower wick (buyers maintained continuous upward pressure from the open)[cite: 2]. Sell signals require NormalizeDouble(HAHigh[i], _Digits) == NormalizeDouble(HAOpen[i], _Digits), confirming zero upper wick (sellers maintained continuous downward pressure from the open)[cite: 2].
- Execution Coordinates: When confirmed, Buy signals record the price level at HALow[i] - (SignalDistance * _Point) into Buffer 5[cite: 2]. Sell signals record the price level at HAHigh[i] + (SignalDistance * _Point) into Buffer 6[cite: 2].
4. MODULAR FILTER LOGIC & MATHEMATICAL DECISION RULES
The indicator provides 15 independent confirmation layers that evaluate concurrently[cite: 2]. Any enabled filter returning false instantly voids the trade signal[cite: 2]:
- RSI Cross Filter: Evaluates Relative Strength Index over RSI_Length with RSI_Price_Source[cite: 2]. Buy condition requires an upward breakout from oversold conditions: (rsi[idx] > Oversold && rsi[idx + 1] <= Oversold)[cite: 2]. Sell condition requires a downward breakdown from overbought levels: (rsi[idx] < Overbought && rsi[idx + 1] >= Overbought)[cite: 2].
- ADX Filter: Evaluates Average Directional Movement Index over ADX_Period[cite: 2]. Buy and Sell conditions both mandate adx[idx] >= ADX_Min_Level, suppressing entries during sideways market chop[cite: 2].
- Single MA Filter: Compares actual bar close against a Moving Average calculated with MA_Period, MA_Method, and MA_Shift[cite: 2]. Buy condition requires close[i] > ma[idx]; Sell condition requires close[i] < ma[idx][cite: 2].
- Ichimoku Senkou Span B Filter: Evaluates the midpoint equilibrium of historical price extremes over Ichimoku_SenkouB bars shifted by Ichimoku_Kijun bars via the internal CalcSenkouSpanB function: SenkouSpanB = (Highest High + Lowest Low) / 2.0[cite: 2]. Buy requires close[i] > senkouB; Sell requires close[i] < senkouB[cite: 2].
- RSI 75 Filter: Evaluates macro regime bias using an extended RSI period (RSI_Filter_Period)[cite: 2]. Buy requires rsi75[idx] > 50.0; Sell requires rsi75[idx] < 50.0[cite: 2].
- Double MA Filter: Evaluates dual Moving Average curve alignment comparing Fast MA (MA_A_Period, MA_A_Method, MA_A_Applied, MA_A_Shift) against Slow MA (MA_B_Period, MA_B_Method, MA_B_Applied, MA_B_Shift)[cite: 2]. Buy requires ma_a[idx] > ma_b[idx]; Sell requires ma_a[idx] < ma_b[idx][cite: 2].
- Awesome Oscillator Module: Evaluates market momentum through three selectable sub-filters: AO Volume Filter mandates ao_now >= AO_Buy_Min for Buy and ao_now <= AO_Sell_Max for Sell[cite: 2]; AO Color Filter enforces bar-to-bar acceleration requiring ao_now > ao_prev for Buy and ao_now < ao_prev for Sell[cite: 2]; AO Zero Filter requires directional zero-line alignment requiring (ao_now > ao_prev && ao_now > 0) for Buy and (ao_now < ao_prev && ao_now < 0) for Sell[cite: 2].
- Parabolic SAR Filter: Evaluates price location relative to Parabolic SAR calculated via SAR_Step and SAR_Maximum[cite: 2]. Buy requires close[i] > sar[idx]; Sell requires close[i] < sar[idx][cite: 2].
- Heiken Ashi Filter: Enforces candle polarity alignment requiring currBull == true for Buy and currBull == false for Sell[cite: 2].
- CCI Trend Filter: Uses Commodity Channel Index over CCI_Period with CCI_Applied[cite: 2]. Buy requires cci[idx] > 0.0; Sell requires cci[idx] < 0.0[cite: 2].
- CCI OB/OS Filter: Uses Commodity Channel Index over CCI_OBOS_Period with CCI_OBOS_Applied[cite: 2]. Buy requires cci_obos[idx] > CCI_Overbought (+100); Sell requires cci_obos[idx] < CCI_Oversold (-100)[cite: 2].
- RVI Trend Filter: Evaluates Relative Vigor Index over RVI_Period[cite: 2]. Buy requires rvi[idx] > 0.0; Sell requires rvi[idx] < 0.0[cite: 2].
- RVI Signal Filter: Evaluates Relative Vigor Index over RVI_Signal_Period comparing main line against signal line[cite: 2]. Buy requires rvi_main[idx] > rvi_sig[idx]; Sell requires rvi_main[idx] < rvi_sig[idx][cite: 2].
- MACD Signal Filter: Evaluates MACD histogram spread (Main line minus Signal line) configured via MACD_FastEMA, MACD_SlowEMA, MACD_SignalSMA, and MACD_Applied[cite: 2]. Buy requires hist > 0.0; Sell requires hist < 0.0[cite: 2].
- MACD Zero Filter: Evaluates the absolute polarity of the MACD main line[cite: 2]. Buy requires macd_main[idx] > 0.0; Sell requires macd_main[idx] < 0.0[cite: 2].
- Support & Resistance Filter: Calculates dynamic channel boundaries across SR_Period bars by identifying lowest low and highest high[cite: 2]. A zone buffer is defined by SR_Zone_Points * _Point[cite: 2]. Buy requires candle price action to interact with the calculated support zone[cite: 2]. Sell requires candle price action to interact with the calculated resistance zone[cite: 2].
- Fibonacci Retracement Filter: Uses an integrated ZigZag algorithm (ZigZag_Depth, ZigZag_Deviation, ZigZag_Backstep) to locate recent swing extremes[cite: 2]. It calculates retracement ratios between Fib_Level_1 (0.382) and Fib_Level_2 (0.618)[cite: 2]. Signals require bar price range to test within this retracement channel[cite: 2].
5. COMPLETE INPUT PARAMETERS DOCUMENTATION
Signal Offset Setting:
- SignalDistance (Default: 30.0) -> Vertical spacing in points between arrow marker and candle extreme[cite: 2].
RSI Crossover Parameters:
- Use_RSI_Cross_Filter (Default: false) -> Master toggle for RSI threshold breakout filter[cite: 2].
- RSI_Length (Default: 14) -> Calculation period for RSI oscillator[cite: 2].
- RSI_Price_Source (Default: PRICE_CLOSE) -> Applied price enumeration for RSI calculation[cite: 2].
- Oversold (Default: 30.0) -> Lower boundary threshold for Buy signal confirmation[cite: 2].
- Overbought (Default: 70.0) -> Upper boundary threshold for Sell signal confirmation[cite: 2].
ADX Directional Parameters:
- Use_ADX_Filter (Default: false) -> Master toggle for ADX trend strength filter[cite: 2].
- ADX_Period (Default: 10) -> Smoothing period for ADX indicator[cite: 2].
- ADX_Min_Level (Default: 20.0) -> Minimum trend strength threshold required for valid execution[cite: 2].
Single Moving Average Parameters:
- Use_MA_Filter (Default: false) -> Master toggle for single Moving Average trend filter[cite: 2].
- MA_Period (Default: 50) -> Calculation period for the Moving Average[cite: 2].
- MA_Method (Default: MODE_SMA) -> Smoothing method (SMA, EMA, SMMA, LWMA)[cite: 2].
- MA_Shift (Default: 0) -> Horizontal bar displacement for MA calculation[cite: 2].
Ichimoku Senkou Span B Parameters:
- Use_Ichimoku_Filter (Default: false) -> Master toggle for Senkou Span B equilibrium filter[cite: 2].
- Ichimoku_SenkouB (Default: 52) -> Lookback period used to average high and low extremes[cite: 2].
- Ichimoku_Kijun (Default: 26) -> Bar displacement shift applied to Senkou Span B[cite: 2].
RSI 75 Long-Baseline Parameters:
- Use_RSI75_Filter (Default: false) -> Master toggle for long-term RSI bias filter[cite: 2].
- RSI_Filter_Period (Default: 75) -> Extended smoothing period for baseline RSI calculation[cite: 2].
Double Moving Average Parameters:
- Use_DoubleMA_Filter (Default: false) -> Master toggle for dual MA trend alignment filter[cite: 2].
- MA_A_Period (Default: 30) -> Lookback averaging period for Fast Moving Average[cite: 2].
- MA_A_Method (Default: MODE_EMA) -> Smoothing method applied to Fast Moving Average[cite: 2].
- MA_A_Applied (Default: PRICE_CLOSE) -> Applied price enumeration for Fast Moving Average[cite: 2].
- MA_A_Shift (Default: 0) -> Horizontal bar displacement for Fast Moving Average[cite: 2].
- MA_B_Period (Default: 140) -> Lookback averaging period for Slow Moving Average[cite: 2].
- MA_B_Method (Default: MODE_EMA) -> Smoothing method applied to Slow Moving Average[cite: 2].
- MA_B_Applied (Default: PRICE_CLOSE) -> Applied price enumeration for Slow Moving Average[cite: 2].
- MA_B_Shift (Default: 0) -> Horizontal bar displacement for Slow Moving Average[cite: 2].
Awesome Oscillator Parameters:
- Use_AO_Filter (Default: false) -> Master toggle for Awesome Oscillator analysis[cite: 2].
- Use_AO_Volume_Filter (Default: false) -> Enables absolute value threshold checks[cite: 2].
- AO_Buy_Min (Default: 4.0) -> Minimum positive value required for Buy trades[cite: 2].
- AO_Sell_Max (Default: -4.0) -> Maximum negative value required for Sell trades[cite: 2].
- Use_AO_Color_Filter (Default: false) -> Enforces directional histogram bar slope alignment[cite: 2].
- Use_AO_Zero_Filter (Default: false) -> Enforces histogram polarity relative to the zero line[cite: 2].
Parabolic SAR Parameters:
- Use_SAR_Filter (Default: false) -> Master toggle for Parabolic SAR price tracking[cite: 2].
- SAR_Step (Default: 0.02) -> Acceleration factor increment step[cite: 2].
- SAR_Maximum (Default: 0.2) -> Upper limit for the acceleration factor[cite: 2].
Heiken Ashi Filter Parameters:
- Use_HeikenAshi_Filter (Default: false) -> Enforces strict current candle color agreement[cite: 2].
CCI Trend Parameters:
- Use_CCI_Filter (Default: false) -> Master toggle for 50-period CCI zero-line filter[cite: 2].
- CCI_Period (Default: 50) -> Calculation window for CCI trend evaluation[cite: 2].
- CCI_Applied (Default: PRICE_CLOSE) -> Applied price series for CCI calculation[cite: 2].
CCI Overbought & Oversold Parameters:
- Use_CCI_OBOS_Filter (Default: false) -> Master toggle for CCI boundary penetration[cite: 2].
- CCI_OBOS_Period (Default: 14) -> Calculation window for fast CCI evaluation[cite: 2].
- CCI_OBOS_Applied (Default: PRICE_CLOSE) -> Applied price series for fast CCI[cite: 2].
- CCI_Overbought (Default: 100.0) -> Upper boundary threshold level[cite: 2].
- CCI_Oversold (Default: -100.0) -> Lower boundary threshold level[cite: 2].
Relative Vigor Index Parameters:
- Use_RVI_Filter (Default: false) -> Master toggle for baseline RVI trend direction[cite: 2].
- RVI_Period (Default: 75) -> Lookback period for trend RVI calculation[cite: 2].
- Use_RVI_Signal_Filter (Default: false) -> Master toggle for RVI signal line crossover[cite: 2].
- RVI_Signal_Period (Default: 20) -> Lookback period for fast RVI cross calculation[cite: 2].
MACD Parameters:
- Use_MACD_Filter (Default: false) -> Master toggle for MACD histogram polarity validation[cite: 2].
- MACD_FastEMA (Default: 12) -> Fast exponential moving average period[cite: 2].
- MACD_SlowEMA (Default: 26) -> Slow exponential moving average period[cite: 2].
- MACD_SignalSMA (Default: 9) -> Signal line simple moving average period[cite: 2].
- MACD_Applied (Default: PRICE_CLOSE) -> Applied price series for MACD calculations[cite: 2].
- Use_MACD_Zero_Filter (Default: false) -> Master toggle for MACD main line zero-level validation[cite: 2].
Support & Resistance Parameters:
- Use_SR_Filter (Default: false) -> Master toggle for dynamic channel zone verification[cite: 2].
- SR_Period (Default: 50) -> Historical bar count scanned for local price extremes[cite: 2].
- SR_Zone_Points (Default: 80.0) -> Channel boundary buffer width expressed in points[cite: 2].
Fibonacci Retracement Parameters:
- Use_Fib_Filter (Default: false) -> Master toggle for swing-based Fibonacci retracement[cite: 2].
- Fib_Level_1 (Default: 0.382) -> Shallow boundary retracement ratio[cite: 2].
- Fib_Level_2 (Default: 0.618) -> Deep boundary golden ratio[cite: 2].
- ZigZag_Depth (Default: 12) -> Minimum bar interval for swing extreme identification[cite: 2].
- ZigZag_Deviation (Default: 5) -> Minimum price deviation in points required for swing points[cite: 2].
- ZigZag_Backstep (Default: 3) -> Minimum bar displacement between consecutive swing turns[cite: 2].
Alerts & Notifications Parameters:
- Use_Alert_Popup (Default: true) -> Enables native terminal dialogue alert box[cite: 2].
- Use_Alert_Sound (Default: true) -> Enables acoustic alert notification[cite: 2].
- Use_Push_Notification (Default: true) -> Transmits push messages to mobile devices via MetaQuotes ID[cite: 2].
- Use_Email_Alert (Default: false) -> Dispatches email notifications via terminal SMTP settings[cite: 2].
- Buy_Sound_File (Default: "alert.wav") -> Sound file played for confirmed Buy signals[cite: 2].
- Sell_Sound_File (Default: "alert2.wav") -> Sound file played for confirmed Sell signals[cite: 2].
6. ALERT PROTOCOL & OPERATIONAL RECOMMENDATIONS
The indicator features an optimized event handling mechanism that triggers once per closed bar using internal timestamp verification (last_alert_bar), preventing repeated audio loops or notification spam on identical candles[cite: 2]. Upon initial chart application, historical bars are plotted without firing old alerts, ensuring clean startup behavior[cite: 2]. The indicator is fully compatible with Forex pairs, commodities, stock indices, and crypto CFDs across all MetaTrader 5 timeframes (recommended M15 to H1 for momentum stability)[cite: 1, 2]. Indicator handles are created at initialization and cleanly released upon deinitialization (IndicatorRelease) to ensure terminal resource efficiency[cite: 2].
7. REGULATORY RISK DISCLAIMER
Trading foreign exchange, commodities, cryptocurrencies, and derivative financial products carries high exposure to capital loss and may not be suitable for all categories of investors[cite: 1]. Past performance, simulated backtests, and indicator modeling do not provide a guarantee of future operational performance[cite: 1]. This software is an analytical visual tool designed solely to assist manual chart reading and does not constitute investment advice or guaranteed return mechanisms[cite: 1]. Always evaluate indicator behavior on a demo account before considering live deployment[cite: 1].
