EA-1159 · Trend Following

Exp_2MoHLC

This EA trades based on the 2MoHLC custom indicator, which generates a cloud from two moving averages. It supports two modes: cloud color change (trend reversal) and cloud breakthrough (price breaking through the cloud boundary), opening buy/sell positions accordingly with configurable stop loss and take profit.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★☆☆☆
TypeTrading EA
TimeframesH1, H4, D1
Indicators2MoHLC, Moving Average
AuthorCopyright © 2012, Nikolay Kositsin

Backtest results (H1, about 1 year)

SymbolP&LAnnualMax DDTradesWin rateSharpeRecoveryLosing streakPer tradeStatus
EURUSD0.00%0.00%0.00%0—————Custom indicator approximated
GBPUSD0.00%0.00%0.00%0—————Custom indicator approximated
USDJPY0.00%0.00%0.00%0—————Custom indicator approximated
XAUUSD0.00%0.00%0.00%0—————Custom indicator approximated

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 the 2MoHLC indicator which generates upper and lower cloud bands (UpValue and DnValue) from two moving averages with different periods. In CloudColor mode, an uptrend is identified when the upper band is above the lower band, and a buy signal is generated when the bands cross from the previous bar; conversely for sell signals. In Breakdown mode, a buy signal occurs when the close price breaks above the maximum of both cloud bands, and a sell signal when it breaks below the minimum. Exit conditions include fixed stop loss and take profit in points, as well as position closing on trend reversal signals. Position sizing is controlled by the MM parameter, where negative values represent fixed lot size and positive values represent a share of the deposit. Money management relies on the external TradeAlgorithms.mqh library functions (BuyPositionOpen/SellPositionOpen) with slippage protection and signal timestamp mechanisms. The strategy uses the IsNewBar mechanism to ensure signals are only calculated on new bar formation, preventing repeated trades on every tick.

Strengths

  • Dual-mode design (cloud color change and cloud breakthrough) provides flexible trading strategy options
  • Complete open/close permission controls allow fine-tuning of long and short directions
  • Uses IsNewBar mechanism to avoid recalculating signals on every tick, reducing resource consumption
  • Complete stop loss and take profit parameters provide basic risk control safeguards
  • Handles data copy failures via the Recount flag with basic fault tolerance

Weaknesses

  • Depends on external TradeAlgorithms.mqh library with invisible core trading logic, making full risk assessment difficult
  • Stop loss of 1000 points and take profit of 2000 points are large, potentially leading to significant single-trade losses
  • No trading session filter, may produce unfavorable fills during low liquidity periods
  • Lacks trailing stop or break-even mechanism, unable to lock in floating profits
  • Does not check for existing positions in the same direction, potentially opening duplicate positions

Possible improvements

  • Add trailing stop functionality to lock in profits when price moves favorably
  • Add trading session filter and spread filter to avoid opening positions under unfavorable market conditions
  • Add same-direction position check to prevent duplicate openings causing overexposure

Risk assessment

Overall risk: Medium

  • Position management logic in external library is unauditable, posing unknown risks
  • Large stop loss value (1000 points) may result in significant single-trade losses
  • No same-direction position check may lead to overexposure

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management2.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.5

Parameters

ParameterDefaultDescription
MM-0.1Deposit ratio; negative value=fixed lot size
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum slippage in points
BuyPosOpentrueAllow buy position opening
SellPosOpentrueAllow sell position opening
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4Indicator timeframe
ModeBreakdownIndicator mode: cloud color change or cloud breakout
Period124Moving average period 1
Period248Moving average period 2
SignalBar1Bar index for entry signal

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.