Exp_iStochKomposter
This EA trades based on signals from the custom iStochKomposter indicator, a Stochastic-based oscillator with overbought/oversold levels. It opens buy positions on oversold signals and sell positions on overbought signals, with configurable close-on-opposite-signal logic. Position sizing uses a flexible money management system supporting lot, free margin, balance, and loss-based modes.
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 EA's strategy is centered on mean reversion trading using the custom iStochKomposter indicator, which is essentially an enhanced Stochastic oscillator combined with an ATR period parameter. Entry conditions are: a buy signal is generated when the indicator's upper buffer (buffer 1) produces a non-zero, non-EMPTY_VALUE on the specified signal bar; a sell signal is generated when the lower buffer (buffer 0) produces a non-zero, non-EMPTY_VALUE on the signal bar. Exit conditions are twofold: closing via opposite signals (buy signal triggers sell position close, sell signal triggers buy position close), and through fixed stop-loss and take-profit levels. For position sizing, the EA offers five money management modes: fixed lot, based on free margin, based on balance, based on post-loss free margin, and based on post-loss balance. The EA implements a new bar detection mechanism to prevent repeated trades within the same candle, and uses a Recount flag to ensure signal recalculation when buffer reads fail. Additionally, when both opening and closing are allowed but no close signal exists, the EA backtracks through historical bars to find the nearest opposite signal to determine whether to close existing positions.
Strengths
- Implements new bar detection to prevent repeated trades within the same candle, reducing overtrading risk
- Offers five money management modes providing flexibility for different risk appetites
- Configurable stop-loss and take-profit with a 1:2 risk-reward ratio (TP=2000, SL=1000)
- Automatic signal recalculation via Recount flag on buffer read failure enhances robustness
- Independent open/close switches allow fine-grained strategy configuration
Weaknesses
- ATR_Period is not declared as input, making it invisible in the EA parameter panel and unoptimizable in the strategy tester
- The historical bar backtracking loop (line 142) lacks an upper bound, potentially causing performance issues on charts with extensive history
- No position check before opening trades, risking duplicate positions in the same direction
- No spread filter — trades may open during high-spread conditions, increasing transaction costs
- Depends on the external custom indicator iStochKomposter, increasing deployment complexity and dependency risk
Possible improvements
- Declare ATR_Period as an input variable to make it configurable and optimizable in the strategy tester
- Add position check logic before opening trades to prevent duplicate same-direction positions
- Add a maximum bar search limit to the historical backtracking loop to prevent performance degradation
Risk assessment
Overall risk: Medium
- No position check before opening, risking position accumulation in the same direction
- Large stop-loss of 1000 points may cause significant single-trade losses on volatile instruments
- Unbounded historical bar backtracking loop may cause EA lag or timeout in extreme cases
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
MM | 0.1 | Money management ratio (lot or percentage) |
MMMode | LOT | Margin mode: free margin/balance/net margin/net balance/fixed lot |
StopLoss_ | 1000 | Stop loss in points |
TakeProfit_ | 2000 | Take profit in points |
Deviation_ | 10 | Maximum slippage tolerance |
BuyPosOpen | true | Allow buy to open |
SellPosOpen | true | Allow sell to open |
BuyPosClose | true | Allow buy-side close (close sell on opposite signal) |
SellPosClose | true | Allow sell-side close (close buy on opposite signal) |
InpInd_Timeframe | PERIOD_H1 | Timeframe for indicator calculation |
ATR_Period | 14 | ATR period (non-input variable) |
KPeriod | 5 | Stochastic K period |
DPeriod | 3 | Stochastic D period |
Slowing | 3 | Stochastic deceleration period |
STO_Method | MODE_SMA | stochasticindicatorsmoothing method |
Price_field | STO_LOWHIGH | Stochastic price field |
UpLevel | 70 | WPR upper overbought level |
DnLevel | 30 | WPR lower oversold level |
SignalBar | 1 | Bar index for signal detection (0=current, 1=completed) |
Similar Mean Reversion EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.