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
Backtest results (H1, about 1 year)
| Symbol | P&L | Annual | Max DD | Trades | Win rate | Sharpe | Recovery | Losing streak | Per trade | Status |
|---|---|---|---|---|---|---|---|---|---|---|
| EURUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| GBPUSD | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| USDJPY | 0.00% | 0.00% | 0.00% | 0 | — | — | — | — | — | Not convertible yet |
| XAUUSD | 0.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
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio or lot size, meaning per MMMode |
MMMode | LOT | Position sizing (free margin/balance/fixed lot, etc.) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
BuyPosOpen | true | Allow buy positions |
SellPosOpen | true | Allow sell positions |
BuyPosClose | true | Allow closing buy positions on reverse signal |
SellPosClose | true | Allow closing sell positions on reverse signal |
InpInd_Timeframe | PERIOD_H1 | NRTR_extr indicator timeframe |
MA_Method | MODE_JJMA | Smoothing method (SMA/EMA/SMMA/LWMA/JJMA/JurX/ParMA/T3/VIDYA/AMA) |
Length | 30 | Indicator period length |
Phase | 100 | Smoothing phase (JJMA:-100~+100, VIDYA:CMO period, AMA:fast EMA period) |
SignalBar | 1 | Signal reference bar index |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.