Exp_Karpenko
This EA trades based on crossover signals from the custom 'Karpenko' indicator, which uses a 144-period MA with historical analysis. It opens buy positions when the indicator line crosses above the signal line and sell positions on the opposite crossover, with configurable stop loss and take profit levels. Position management is handled through the TradeAlgorithms library with multiple margin mode options.
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
This EA employs a trend-following strategy based on the custom Karpenko indicator, with core logic centered on crossover detection between the indicator line and signal line. Entry conditions: a buy signal (BUY_Open) is triggered when the indicator line crosses above the signal line from below, while a sell signal (SELL_Open) fires when the indicator line crosses below the signal line from above; crossover confirmation requires the previous bar's indicator relationship to satisfy the condition and the current bar to confirm the crossover. Exit conditions include fixed stop loss (default 1000 points) and take profit (default 2000 points), plus opposite-signal closing where a sell signal automatically closes long positions and vice versa. Position sizing supports five margin modes: free margin percentage, balance percentage, loss-adjusted free margin, loss-adjusted balance, and fixed lot size, defaulting to 0.1 lots fixed. The EA uses an IsNewBar mechanism to ensure signal calculation occurs only once per bar, preventing duplicate entries, and employs a Recount flag to trigger recalculation when insufficient data is available. The strategy operates on the H4 timeframe using a 144-period MA as the base parameter with 500 bars of historical lookback.
Strengths
- New bar detection mechanism prevents duplicate entries on the same bar, ensuring logic rigor
- Five position sizing modes offer flexibility for different risk preferences
- Opposite-signal auto-closing provides an additional exit protection layer
- Configurable stop loss and take profit with default TP>SL reflecting good risk-reward ratio design
- Independent on/off switches for buy/sell opening and closing provide high flexibility
Weaknesses
- Depends on external custom Karpenko indicator which is not embedded; EA fails to run if indicator is missing
- Default SL=1000 and TP=2000 points are large and may not suit all instruments and timeframes
- No spread filter mechanism, potentially leading to unfavorable fills in high-spread environments
- No trailing stop functionality to lock in floating profits after favorable moves
- Signals rely solely on single indicator crossover, lacking multi-dimensional confirmation and prone to false signals
Possible improvements
- Add multi-timeframe confirmation, e.g., filtering H4 signals with daily trend direction to reduce false signals
- Implement a trailing stop feature that automatically tightens the stop loss as price moves favorably to lock in profits
Risk assessment
Overall risk: Low
- Dependency on external custom indicator causes initialization failure but does not produce erroneous trades
- Large default SL/TP values may lead to low capital efficiency on low-volatility instruments
- No spread filter means slippage in extreme conditions may exceed Deviation setting causing order failure
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management scaling factor |
MMMode | LOT | Margin mode (free margin / balance / fixed lot) |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum 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 |
Basic_MA | 144 | MA period |
History | 500 | Number of historical bars for lookback |
SignalBar | 1 | Bar index for signal calculation |
Similar Trend Following EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.