Exp_simple_trading_system
This EA implements a simple trend-following trading system based on a custom indicator called 'simple_trading_system' that generates up/down arrow signals. It opens buy positions on up signals and sell positions on down signals, with configurable stop loss and take profit levels, and supports multiple money management modes including lot-based and margin-based sizing.
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 | -2.44% | -2.12% | 5.87% | 145 | 43.10% | — | — | — | — | Custom indicator approximated |
| GBPUSD | +3.28% | +2.84% | 4.19% | 145 | 47.90% | — | — | — | — | Custom indicator approximated |
| USDJPY | -1.30% | -1.13% | 5.64% | 145 | 59.00% | — | — | — | — | Custom indicator approximated |
| XAUUSD | -100.00% | -100.00% | 100.00% | 57 | 56.10% | — | — | — | — | Custom indicator approximated |
On every market this backtest is identical to EA-1066, EA-1099, EA-1100, EA-1223, EA-21616. The automatic conversion almost certainly lost what makes this EA different (a custom indicator, a filter or the money management), so these results are not ranked or counted.
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-following signals generated by the custom 'simple_trading_system' indicator, which internally uses EMA as its core calculation foundation. Entry conditions are: a buy position is opened when indicator buffer 1 (UpValue) produces a non-zero, non-EMPTY_VALUE on the specified signal bar, and a sell position is opened when buffer 0 (DnValue) produces such a value. Exit conditions include hard stop loss and take profit levels, plus a reverse-signal closing logic — when both opening and closing permissions are enabled and no close signal exists, the EA backtracks through historical bars to find the most recent opposite signal to determine whether to close positions. Position sizing supports five modes: free margin percentage, balance percentage, loss-adjusted free margin, loss-adjusted balance, and fixed lot size. Money management is controlled via the MM parameter for ratio or lot size and the MMMode parameter for selecting the specific calculation mode. The overall strategy logic is clear but relatively simple, lacking consideration for market volatility and trading costs such as spread.
Strengths
- Clear and concise strategy logic that is easy to understand and maintain
- Multiple money management modes provided for flexibility
- Independent control of open and close permissions for each direction enables versatile configuration
- New bar detection mechanism prevents duplicate entries within the same bar
- Configurable stop loss and take profit parameters provide basic risk control
Weaknesses
- Depends on an external custom indicator whose logic is invisible and cannot be independently verified
- No spread filter, potentially resulting in unfavorable fills during high-spread conditions
- Stop loss of 1000 points is excessively large, potentially causing high single-trade losses
- MAPeriod=2 is extremely short, prone to generating frequent false signals
- The backtrack loop for finding close signals may be inefficient, iterating through all bars in extreme cases
Possible improvements
- Add a spread filter mechanism to pause trading when spread exceeds a threshold
- Optimize the backtrack close logic by setting a maximum bar limit to prevent infinite loops
- Provide more reasonable default MA period values and add signal confirmation to reduce false signals
Risk assessment
Overall risk: Medium
- 1000-point stop loss is excessively large, single-trade loss may account for too high a percentage of total capital
- No spread filter, significant slippage risk during high-volatility periods
- Custom indicator logic is unauditable, presenting black-box risk
- MAPeriod=2 generates frequent signals that may lead to overtrading
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Lot size as percentage of margin |
MMMode | LOT | Lot calculation mode (fixed lot or margin ratio) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum allowed slippage |
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_H6 | Indicator calculation timeframe |
MAShift | 4 | Moving average shift |
MAPeriod | 2 | Moving average period |
MAType | MODE_EMA | Moving average type |
MAPrice | PRICE_CLOSE | Moving average applied price |
SignalBar | 1 | Signal bar index (0=current bar) |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.