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
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 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
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | -0.1 | Trade capital ratio; negative value = fixed lot size |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum price slippage in points |
BuyPosOpen | true | Allow opening long positions |
SellPosOpen | true | Allow opening short positions |
BuyPosClose | true | Allow closing long positions |
SellPosClose | true | Allow closing short positions |
InpInd_Timeframe | PERIOD_H4 | Indicator timeframe |
MA_Period | 14 | Moving average period |
MA_Method | MODE_SMA | Moving average smoothing method |
MA_Price | PRICE_CLOSE | Moving average applied price |
ATR_Period | 60 | ATR period |
SignalBar | 1 | Bar index for entry signal |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.