EA-1109 · Trend Following

Exp_BuySell

This EA trades based on the custom BuySell indicator, which uses an MA and ATR combination to identify trend direction. It opens buy positions when an uptrend signal appears and sell positions when a downtrend signal appears, with configurable stop loss and take profit. The EA includes separate permissions for entering and exiting long and short positions, allowing flexible trade management.

Open the interactive view (equity curve, symbol switch)

Key facts

RiskMedium
Blow-up riskLow
Rating★★★☆☆
TypeTrading EA
TimeframesH1, H4, D1
IndicatorsMA, ATR, BuySell
AuthorCopyright © 2012, Nikolay Kositsin

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 the custom BuySell indicator which internally uses a Moving Average (MA) and Average True Range (ATR) to determine trend direction. Entry conditions are: a buy signal is generated when the UpTrend buffer has a value on the current signal bar and the previous bar was in a DnTrend state; a sell signal is generated when the DnTrend buffer has a value on the current signal bar and the previous bar was in an UpTrend state, representing a trend reversal confirmation logic. Exit conditions include fixed stop loss and take profit in points, as well as closing positions on opposite signals (e.g., closing long positions when a sell signal appears). Position sizing is controlled by the MM parameter, where negative values represent fixed lot sizes and positive values represent deposit share-based sizing. Money management relies on the external TradeAlgorithms.mqh include file for trade execution, but the code itself does not demonstrate detailed risk controls such as maximum position limits or drawdown protection. The EA uses a new bar detection mechanism to prevent repeated trades within the same bar and includes a signal recalculation logic to handle data copy failures gracefully.

Strengths

  • New bar detection mechanism prevents repeated trades within the same bar, reducing overtrading risk
  • Separate permission switches for buy/sell entry and exit provide high flexibility and allow disabling specific directions
  • Signal generation uses state transition confirmation (previous bar in opposite state), reducing false signal entries
  • Fault-tolerant handling for data copy failures with recalculation trigger when CopyBuffer fails
  • Configurable stop loss and take profit with a 2:1 reward-to-risk ratio, supporting positive expectancy design

Weaknesses

  • Depends on external TradeAlgorithms.mqh file, making core trading logic opaque and difficult to independently audit for risk
  • No spread filter, which may cause frequent stop loss triggers in high-spread environments
  • No maximum position count limit or drawdown protection, potentially leading to continuous position addition in extreme markets
  • The BuySell indicator is a custom indicator not embedded in the EA, requiring separate installation for deployment
  • Fixed stop loss and take profit do not adapt to market volatility, potentially being mismatched across different volatility regimes

Possible improvements

  • Add ATR-based dynamic stop loss and take profit to adapt stop distances to market volatility
  • Add maximum simultaneous position limit and account drawdown protection mechanism for capital safety
  • Add spread filter and trading session filter to avoid opening positions in unfavorable trading conditions

Risk assessment

Overall risk: Medium

  • Dependency on external include file creates hidden risks from opaque trading logic
  • No maximum position limit or drawdown protection leaves risk exposure uncontrolled in extreme markets
  • Fixed stop loss does not account for spread and slippage, making actual stop loss potentially larger than expected

Evaluation scores

Code quality3.0
Strategy logic3.0
Risk management3.0
Robustness3.0
Innovation2.0
Documentation2.0
Overall2.7

Parameters

ParameterDefaultDescription
MM-0.1Trade capital ratio; negative value = fixed lot size
StopLoss_1000Stop loss in points
TakeProfit_2000Take profit in points
Deviation_10Maximum price slippage in points
BuyPosOpentrueAllow opening long positions
SellPosOpentrueAllow opening short positions
BuyPosClosetrueAllow closing long positions
SellPosClosetrueAllow closing short positions
InpInd_TimeframePERIOD_H4Indicator timeframe
MA_Period14Moving average period
MA_MethodMODE_SMAMoving average smoothing method
MA_PricePRICE_CLOSEMoving average applied price
ATR_Period60ATR period
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.