EA-15214 · Trend Following

Exp_Heiken_Ashi_Smoothed

This EA trades based on trend reversal signals from the Heiken Ashi Smoothed custom indicator. It opens buy positions when the trend changes from bearish to bullish and sell positions when the trend changes from bullish to bearish, with configurable position sizing and stop-loss/take-profit levels.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesM15, H1, H4, D1
IndicatorsHeiken Ashi Smoothed, JJMA, EMA, SMA, LWMA, SMMA, JurX, ParMA, T3, VIDYA, AMA
Author—

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Not convertible yet
GBPUSD0.00%0.00%0.00%0—————Not convertible yet
USDJPY0.00%0.00%0.00%0—————Not convertible yet
XAUUSD0.00%0.00%0.00%0—————Not convertible yet

Why this EA never traded: no entry rule survived the conversion.

Converted from MQL5 to Python and run with the same rules for every EA. Positions use MT5 lot sizes (100,000 units per FX lot, 100 oz per gold lot) with 1:100 leverage, one order at a time, and a stop-out below 10% of the starting balance. Sharpe is computed from the equity curve. Results marked as unreliable are shown for completeness only.

Blow-up risk: No blow-up pattern found

None of the usual blow-up patterns were found in the code, and the account was not stopped out in our backtests. That is not a guarantee: any EA can lose money.

High: stopped out in our backtest, or martingale/grid sizing without a stop loss. Elevated: martingale or grid sizing with a stop loss, or several positions at once without a stop loss. What the label means and what we found →

Strategy analysis

The strategy concept is based on trend direction changes from the Heiken Ashi Smoothed indicator, reading indicator buffer 4 to determine the current and previous bar's trend state. Entry conditions: a buy signal is generated when TrendValue changes from 0 to 1 (simultaneously closing sell positions), and a sell signal is generated when TrendValue changes from 1 to 0 (simultaneously closing buy positions). Exit conditions include hard stop-loss and take-profit levels, as well as position closure triggered by opposing trend signals. Position sizing is controlled by the MM parameter for risk ratio, while the MMMode parameter supports multiple margin calculation modes including free margin, balance, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. Money management offers 5 modes with fixed lot (LOT) as the default. The strategy also includes an additional persistent-trend closing logic: when both open and close permissions are enabled for the same direction, repeated close signals are issued while the trend persists to ensure positions are properly closed.

Strengths

  • Clear and concise strategy logic based on trend reversal signals, easy to understand and maintain
  • Supports 10 smoothing algorithms, allowing flexible indicator parameter tuning for different market conditions
  • Reasonable stop-loss/take-profit setup (1:2 risk-reward ratio) with slippage control parameter
  • Offers 5 position sizing modes to accommodate traders with different risk preferences
  • Includes new bar detection mechanism to prevent repeated entries within the same bar

Weaknesses

  • Lacks volatility filtering (e.g., ATR), prone to frequent false signals and consecutive losses in ranging markets
  • Fixed stop-loss of 1000 points and take-profit of 2000 points are large and not dynamically adjusted for market volatility, may not suit all instruments
  • No existing position check logic, potentially opening duplicate positions in the same direction
  • Depends on external custom indicator and TradeAlgorithms.mqh library, reducing portability
  • SignalBar defaults to 1 introducing signal delay, but lacks additional filtering protection when using real-time signals (SignalBar=0)

Possible improvements

  • Add ATR-based dynamic stop-loss and take-profit that automatically adjusts distances based on market volatility
  • Add position check and maximum position count limit to prevent duplicate same-direction entries causing overexposure
  • Add a ranging/trending market filter (e.g., ADX or Bollinger Band width) to reduce trade frequency in sideways markets

Risk assessment

Overall risk: Medium

  • No position check may lead to duplicate same-direction entries causing oversized positions
  • Fixed stop-loss/take-profit ignores market volatility, being too wide in low-volatility and too tight in high-volatility markets
  • Trend-following strategy generates frequent false signals in ranging markets leading to consecutive losses

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness2.0
Innovation2.0
Documentation1.0
Overall2.3

Parameters

ParameterDefaultDescription
MM0.1Money management ratio or lot size, meaning per MMMode
MMModeLOTPosition sizing (free margin/balance/fixed lot, etc.)
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum allowed slippage
BuyPosOpentrueAllow buy positions
SellPosOpentrueAllow sell positions
BuyPosClosetrueAllow closing buy positions on reverse signal
SellPosClosetrueAllow closing sell positions on reverse signal
InpInd_TimeframePERIOD_H1NRTR_extr indicator timeframe
MA_MethodMODE_JJMASmoothing method (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA)
Length30Indicator period length
Phase100Smoothing phase (JJMA:-100~+100, VIDYA:CMO period, AMA:fast EMA period)
SignalBar1Signal reference bar index

Similar Trend Following EAs

Backtests are historical simulations and do not guarantee future results. Not financial advice.

Get the weekly Arena report

One email a week: ranking changes, new signals and new research. No spam; unsubscribe any time.