Exp_breakeven_trailing_SL
This EA is a position management utility that automatically moves stop loss to breakeven when a position reaches a specified profit threshold, then applies a trailing stop to lock in further gains. It does not open any trades itself; it only modifies existing stop loss levels via CTrade::PositionModify. It supports filtering by symbol and magic number.
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 concept of this EA is profit protection, divided into breakeven and trailing stop phases. Entry conditions are not applicable since this utility does not open positions; it only manages existing ones. For exit conditions, in the breakeven phase: when Bid exceeds open price plus PlusPoints_breakeven points, the SL is moved to open price plus StepSL_plus_breakeven points; sell positions work symmetrically with Ask. In the trailing phase: when price continues favorably beyond PlusPoints_trail points, the SL follows in steps of StepSL_plus_trail. Position sizing is not applicable as the EA does not open trades. Money management is also not directly applicable, but the tool indirectly protects capital by progressively locking in profits. The stop loss modification respects SYMBOL_TRADE_STOPS_LEVEL minimum distance requirements, preventing rejection due to stops being too close to current price.
Strengths
- Dual protection mechanism: breakeven first then trailing, with clear layered execution logic
- Supports multi-symbol management with magic number filtering for precise position targeting
- Respects SYMBOL_TRADE_STOPS_LEVEL minimum distance when modifying stops, preventing broker rejection
- Validates input parameters during initialization to prevent unreasonable configurations
Weaknesses
- No return value check on PositionModify, so failed stop modifications go unnoticed
- Iterates all positions and calls SymbolInfoDouble/Integer every tick, which is inefficient
- No new bar detection, potentially triggering redundant modification requests within the same bar
- Parameters use raw points rather than point value, requiring separate tuning per instrument
- No spread filter, so large spreads could immediately trigger breakeven or trailing logic
Possible improvements
- Add PositionModify return value checking and error logging to confirm stop modifications succeed
- Introduce new bar detection or timer mechanism to reduce unnecessary frequent iteration and quote requests
- Add spread filter and slippage protection to avoid stop modifications during abnormal spread conditions
Risk assessment
Overall risk: Safe
- Not checking PositionModify return values means failed stop modifications go unnoticed, falsely assuming positions are protected
- No spread filter means stop modifications could be rejected during extreme market conditions due to insufficient stop distance
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
WorkSymb | AllSymbols | Working symbol: current or all symbols |
MagicNumber | 0 | Magic number: -1 all positions, 0 manual, >0 specific EA |
PlusPoints_breakeven | 500 | Breakeven trigger points; 0 disables breakeven |
StepSL_plus_breakeven | 200 | Breakeven SL step (points above open price); 0 disables |
PlusPoints_trail | 300 | Trailing stop trigger points; 0 disables trailing |
StepSL_plus_trail | 100 | Trailing stop step points; 0 disables |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.