BreakoutBarsTrend_EA
This EA trades trend reversals detected by the custom BreakoutBarsTrend_v2 indicator. It enters a position when the indicator signals a trend direction change, optionally waiting for a configurable number of consecutive negative (losing) trend reversals before entering. Stop Loss and Take Profit are calculated based on either pips or percentage mode.
Open the interactive view (equity curve, symbol switch)Key facts
Backtest results (H1, about 1 year)
Not backtested yet — this EA could not be converted automatically.
Strategy analysis
The core strategy of this EA is based on detecting trend breakouts and reversals using the BreakoutBarsTrend_v2 custom indicator. Entry conditions: the EA opens a buy when the indicator value crosses from negative to positive (trend reversal upward) and opens a sell when it crosses from positive to negative (trend reversal downward). Additionally, the EA implements a negative signal filter — when InpNegatives is greater than zero, it only enters after N consecutive losing reversal signals, which is a contrarian approach attempting to catch a successful reversal after a string of failures. Exit conditions include closing the position when the indicator issues an opposing reversal signal, or when the hardcoded stop loss or take profit levels are hit. Position sizing uses a fixed lot size (InpLot) with only basic volume boundary validation and step normalization against broker limits. Money management allows stop loss and take profit to be set in either pips or percentage mode, and accounts for the broker's minimum stop level. The overall strategy logic is straightforward but lacks dynamic position sizing and overall risk exposure control.
Strengths
- Clear and straightforward strategy logic based on trend reversal signals, easy to understand and debug
- Negative signal filter mechanism helps avoid frequent false breakout entries in choppy markets
- Stop loss and take profit calculations account for broker minimum stop levels, reducing order rejection risk
- Supports both pips and percentage modes for parameter configuration, adapting to different instruments and trader preferences
- Well-modularized code structure with single-responsibility functions, facilitating maintenance
Weaknesses
- Depends on the custom BreakoutBarsTrend_v2 indicator which is not embedded; the EA cannot run without it
- Fixed lot sizing with no dynamic adjustment mechanism, unable to adapt position size based on account balance or risk exposure
- The isNegativeSeries function uses negatives*100 as historical data lookback, which can lead to excessive data requests or illogical behavior when negatives is large
- prevTime in checkForClose and checkForOpen is a static local variable that resets on EA restart, potentially causing duplicate trades on the same bar
- Lacks spread filter, slippage control, and trading session restrictions, which may result in unfavorable fills during high-spread or low-liquidity periods
Possible improvements
- Add dynamic position sizing such as risk-percentage or ATR-based lot calculation to improve money management
- Add spread filter and trading session controls to prevent entries under unfavorable market conditions
- Optimize the isNegativeSeries lookback logic to be based on actual trend reversal counts rather than a fixed multiplier, improving data efficiency and logical accuracy
- Persist prevTime state across EA restarts to prevent duplicate signal processing on the same bar
Risk assessment
Overall risk: Medium
- Fixed lot sizing lacks risk adaptability; large accounts may take oversized positions creating concentrated risk
- The negative signal filter requires large historical data lookback when negatives is set high; insufficient data returns false and may miss trading opportunities
- Static variable reset on EA restart may cause duplicate open or close operations on the same bar
- No spread or slippage protection; may get extremely unfavorable fills during news events or low-liquidity periods
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
InpReversal | PERCENT | Reversal mode: PIPS or PERCENT calculation |
InpDelta | 1.0 | Delta value passed to BreakoutBarsTrend_v2 as reversal threshold |
InpNegatives | 1 | Consecutive negative signals to wait; 0=enter immediately |
InpStopLoss | 1.0 | Stop loss distance; unit depends on reversal mode |
InpTakeProfit | 4.0 | Take profit distance; unit depends on reversal mode |
InpLot | 1.0 | Fixed trading lot size |
Similar Breakout EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.