Heikin Ashi Divergence Signal Arrows
- Indicateurs
-
Ramsha Shahrukh
I am a professional MQL5 / MQL4 Expert Advisor Developer and Algorithmic Trading Systems Architect with 5+ years of experience building, debugging, optimizing, and maintaining automated trading systems. - Version: 1.2
Heikin Ashi Divergence Signal Arrows is a MetaTrader 5 custom indicator that combines Heikin Ashi candle analysis with confirmed MACD histogram divergence and visual BUY/SELL signal markers.
The indicator is designed for chart analysis only. It does not open, close, or manage trades.
MAIN FEATURES
• Displays calculated Heikin Ashi candles directly on the chart
• Supports Standard, Trend Based, and Momentum Based candle color modes
• Generates BUY and SELL arrows from confirmed Heikin Ashi direction changes
• Optional regular MACD histogram divergence confirmation
• Uses closed bar signal processing by default
• Provides an alternative momentum circle and later price break confirmation mode
• Supports popup, push notification, email, and sound alerts
• Includes duplicate alert and alert cooldown protection
• Exposes signal buffers for use with Expert Advisors through iCustom()
• Allows configurable candle, signal, divergence, visual, and alert settings
SIGNAL LOGIC
The default signal mode checks for a confirmed Heikin Ashi color transition.
A bullish signal requires:
• A confirmed bullish Heikin Ashi transition
• The configured number of confirmation candles
• The minimum candle body requirement
• A recent confirmed bullish MACD histogram divergence when divergence filtering is enabled
A bearish signal applies the opposite conditions.
The indicator implements regular divergence:
• Bullish regular divergence: price forms a lower low while the MACD histogram forms a higher confirmed trough
• Bearish regular divergence: price forms a higher high while the MACD histogram forms a lower confirmed peak
Hidden divergence is not included.
CLOSED BAR PROCESSING
When UseClosedBarsOnly is enabled, the forming candle is not used as a confirmed signal candle.
This reduces temporary signals caused by live price movement. It does not remove confirmation delay.
MACD divergence pivots require closed bars on both sides of the pivot before they can be confirmed. Signals may therefore appear after the original price turning point.
ALTERNATIVE MOMENTUM MODE
When SignalOnHAColorChange is disabled, the indicator can use a two stage process:
1. A Heikin Ashi direction change creates a momentum circle
2. A later break of the stored reference high or low creates the confirmed arrow
The pending signal can expire or be cancelled by an opposite Heikin Ashi candle, depending on the selected inputs.
ALERTS
Available alert channels:
• Terminal popup
• Mobile push notification
• Email
• Sound
Push notifications, email, and sound require the corresponding MetaTrader 5 terminal settings to be configured correctly.
EA INTEGRATION
The indicator exposes separate buffers for:
• Buy momentum circle
• Sell momentum circle
• Buy confirmed arrow
• Sell confirmed arrow
These buffers can be accessed by another MQL5 program through iCustom().
IMPORTANT LIMITATIONS
• This is an analytical indicator, not an Expert Advisor
• It does not execute or manage trades
• It does not include money management, stop loss, take profit, or position sizing
• It implements regular divergence only
• Divergence confirmation introduces intentional delay
• Historical and live results depend on the selected settings, symbol, timeframe, broker data, and market conditions
• Signals do not guarantee profit, accuracy, win rate, or future performance
The indicator should be tested on a demo account and evaluated independently before being used as part of any trading decision.
