HaikenAshiDouble

Heiken Ashi Double is an MT4 Expert Advisor based on double-smoothed Heiken Ashi signals. It analyzes the latest closed candle, supports separate timeframes for the main signal and additional entries, and includes optional pyramiding, basket management, ATR-based position sizing, initial stop-loss modes, Heiken Ashi trailing stop, spread protection, margin and volume checks, and on-chart diagnostics.

The EA evaluates signals only after a new bar is detected. Does not use a fixed Take Profit; exits are handled by the signal reversal, the configured stop-loss, or the trailing stop. This systém is designed to catch strong, clean trending moves and optionally gradually add to them at progressively better prices.

HeikenAshiDouble is built around a simple but powerful idea: enter the market only when a Heiken Ashi Smoothed candle confirms a clean, strong trend move — and then let the trade run with an intelligent trailing stop.

🔹Heiken Ashi trailing stop

Unlike a standard Heiken Ashi EA, this tool applies two independent moving-average smoothing layers to the Heiken Ashi values, significantly reducing market noise and false signals. On top of the main signal, an optional pyramiding module can add extra positions on a second timeframe using standard (non-smoothed) Heiken Ashi candles — but only in the direction of the trend and only at better prices than the main entry.

How the system trades

🔹Main entry

  • Buy: the smoothed HA candle is bullish, has no lower wick (within tolerance), its body is larger than the previous candle's body, and the previous candle was also bullish.
  • Sell: the mirrored opposite condition (bearish candle with no upper wick, growing body, previous candle bearish).
  • This filters for momentum entering a trend with minimal counter-pressure (wick).
  • The main signal timeframe is configurable independently from the chart timeframe. The default setting is PERIOD_CURRENT, but the EA can be configured to calculate the main signal on another available MT4 timeframe.
🔹Additional orders / pyramiding (Add)
  • When enabled, the EA adds further positions in the direction of the open trade on every color change of the standard HA candle on the additional timeframe.
  • Optionally, each additional order can be required to open at a price better than the Main position's entry price (true pyramiding, not averaging into a loss). The EA uses strict price filtering to avoid averaging down – additional orders are only added at better prices than the main entry.
  • The number of additional orders is capped by a configurable maximum.
  • This setting is designed to support trend-following pyramiding rather than averaging down. The number of additional orders per basket is limited by MaxAddOrders.
  • Main and Additional orders are separated by their order comments so that basket management can be applied consistently.

🔹Stop-loss and basket management

    The Main order can use one of two initial stop-loss modes:
    • According to Main bar - The initial stop-loss is placed beyond the latest Main Heiken Ashi candle using the configured TrailingBuffer.
    • Manual - The stop-loss distance is specified in points by MainSL_ManualPoints. A value of zero means that no initial stop-loss is set.
    • Additional orders inherit the current absolute stop-loss price of the Main order when they are opened. This keeps the basket aligned with the current Main stop-loss level, including stop-loss changes already made by the trailing logic.
    • If the broker, a manual action, or another trading event closes only part of the basket, the EA detects the mismatch and closes the remaining positions to keep the basket synchronized. Orphaned Additional orders are also closed when the Main order no longer exists.

    🔹Heiken Ashi trailing stop

    • The optional trailing stop uses the latest closed Heiken Ashi Smoothed candle. For Buy positions, the stop-loss is moved below the Heiken Ashi low; for Sell positions, it is moved above the Heiken Ashi high. The distance is adjusted by TrailingBuffer points.
    • The trailing stop can be configured to activate only when the Main order is profitable. The optional TrailMinProfit parameter defines the minimum Main-order profit in points required before trailing begins. Trailing stop continuously adjusts SL levels for all orders together, ensuring uniform protection.

    🔹Exit

    • The whole basket (Main + Add orders) is closed when an opposite-colored smoothed HA candle appears with no matching wick, following a same-colored previous candle — i.e. on a trend-reversal signal, or when reaching SL, or TrailingStop.

    🔹Main input parameters overview

    Main Signal              MaPeriod1MaMethod1MaPeriod2MaMethod2 - settings for Heiken Ashi Smoothed

    Timeframes             TimeFrame_MainTimeFrame_Add Timeframes for Main and Additional signals

    Additional Orders    UseAdditionalOrdersMaxAddOrdersRequireAddBeyondMain - Enable pyramiding, max Add orders, price filter

    Wick Tolerance        WickToleranceInPoints - Tolerance for "no wick" detection in entry/exit logic

    Money Management LotsMMATR_PeriodRiskMoneyRisk - Fixed or ATR-based lot sizing with risk controls.

    Stop-Loss                 MainSLMode, MainSL_ManualPoints - Auto or manual initial SL for Main order

    Trailing Stop            UseTrailingStopTrailingBufferTrailOnlyInProfitTrailMinProfit - Trailing activation and thresholds.

    Miscellaneous          SlippageMagicOrderCommentaryShowGraphDiag - General EA settings and display options.

    💰Risk management

    • Trailing stop tied to the smoothed HA candle values, with an adjustable buffer.
    • Initial stop loss can be set automatically from the last HA candle or as a fixed value in points.
    • All orders in the basket (Main and Add) share the same SL level, and the EA automatically monitors and re-synchronizes the basket if the broker partially closes it (e.g. via SL execution).
    • Position sizing: fixed lot, or automatic money management based on percentage risk / fixed monetary amount / ATR.

    🔥Diagnostics

    • An optional on-chart panel displays current HA candle values, wick status, active signals, and stop-loss state — useful for monitoring and verifying behavior in real time.

    ⚙️Recommendations

    • Best timeframe for Main/Add is Daily/H1, of course you can try anything (for example 15M/1M)
    • Works on all symbols and timeframes (recommended symbols are those that are trending), but should always be tested on your specific broker and symbol first
    • One of the most important settings is Wick Tolerance. Setting of 2 means that a signal is only generated during very strong movements. The higher this value, the higher the frequency of signals. Maximum that suited me is 10.
    • The EA reacts only to closed bars — no intra-bar repainting of signals
    • A VPS is recommended for reliable basket synchronization and trailing, especially when pyramiding is enabled
    • Magic number and order comments allow running multiple instances on different symbols/timeframes simultaneously

      📈Suitable for

      Traders who favor trend-following strategies on any symbol and timeframe, and who want a system with clearly defined, mechanical rules and the ability to scale into a strong trend gradually. Thorough backtesting in the Strategy Tester on the intended symbol/timeframe is recommended before live deployment, along with choosing money-management settings that match your own risk tolerance.

      ⚠️Disclaimer

      Trading on financial markets carries a risk of loss of invested capital. The author and provider of this product are not liable for any damages arising from its use. Past performance does not guarantee future results.





              Mais do autor
              The indicator summarizes all open positions. Settings: HeaderTextColor = Yellow;     // Header text color FooterTextColor = Yellow;     // Text color in totals ProfitColorPositive = Lime;   // Color for gain values ProfitColorNegative = Red;    // Color for loss values SeparatorColor = Gray;        // Color for separators FontSize = 12;                  // Text size LineSpacing = 15;               // Line spacing FontName = "Courier New";    // Font name TableCorner = 0;                // 0: Top
              FREE
              This indicator displays the current SWAP values (for both buy and sell positions) of individual trading instruments directly in the chart. It allows traders to quickly identify which symbols have positive or negative swaps, helping them make better decisions when choosing positions that may be more advantageous for long-term holding. ️ Indicator Settings Selection of Displayed Symbols The user can choose which instruments are displayed in the table: • only currency pairs, • all symbols from the
              FREE
              SMartPlus
              Miroslav Vokaty
              Este EA simples é criado para um sistema baseado no fato de que cada produto comercializável, mais cedo ou mais tarde, cria um movimento para cima ou para baixo. A primeira entrada é sempre na forma de hedge (compra e venda) no volume informado no campo "Base Lot". O volume da próxima entrada depende do valor inserido no campo "Lote Expoente" por exemplo: a primeira entrada é 0,01 Lote, Lote Expoente = 2, a próxima entrada será 0,02. A distância para a entrada do próximo nível é definida no cam
              RangePower Index is an MT4 indicator that accurately measures the strength of currencies, indices, gold and oil based on their daily range. Thanks to this, you will immediately know which assets have real momentum and which, on the contrary, are losing strength. Daily range analysis (high–low) for currencies, indices, gold and oil Quick visualization of the strongest and weakest assets With RangePower Index you will gain a clear competitive advantage - trade only where there is real market
              Filtro:
              Sem comentários
              Responder ao comentário