Trailing Sl
This EA is a trailing stop loss utility that modifies existing positions' stop losses to follow price movement. It does not open any trades itself; it only manages stop losses and take profits for positions matching its magic number and symbol. The trailing activates after a configurable profit threshold is reached.
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 a trailing stop loss mechanism designed to lock in floating profits on existing positions. Regarding entry conditions, this EA does not open trades itself; it only manages existing positions, so there is no entry logic. For exit conditions, when a buy position's profit exceeds TslTriggerPoints points, the stop loss is moved to TslPoints points below the current Bid price; for sell positions, when the Ask price falls below the open price by TslTriggerPoints points, the stop loss is set TslPoints points above the current Ask price. Position sizing is handled externally since this EA does not open positions, though it includes an unused Lots parameter. Money management relies on fixed point distances for the trailing stop without any dynamic adjustment based on account equity or market volatility. The EA filters positions by magic number and symbol to avoid interfering with positions from other EAs.
Strengths
- Clean and straightforward logic focused solely on trailing stop functionality, easy to understand and maintain
- Filters positions by magic number and symbol to prevent accidentally modifying other EAs' positions
- Correctly uses Bid for buy positions and Ask for sell positions when calculating stop loss levels
- Iterates positions from last to first, avoiding index shift issues during modification
Weaknesses
- Lots, Setloss, and TakeProfit parameters are declared but never used, causing confusion
- No check on the return value of trade.PositionModify, modifications may silently fail
- No check for minimum stop level (StopsLevel), which could cause modification rejections by the server
- Does not account for varying point sizes across different instruments, may be inaccurate for non-standard symbols
- No logging output, making debugging and runtime monitoring difficult
Possible improvements
- Remove unused parameters (Lots, Setloss, TakeProfit) or integrate them into actual logic
- Add return value checking for trade.PositionModify and error logging output
- Add SYMBOL_TRADE_STOPS_LEVEL validation to ensure stop loss modifications won't be rejected by the server
Risk assessment
Overall risk: Medium
- No return value check on stop modification, users may be unaware if the stop loss was not actually modified
- No server minimum stop level check, which may cause frequent modification failures
- Attempts modification on every tick during fast markets, potentially increasing server load and triggering rate limits
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
Lots | 0.2 | Lot size (not used by this EA) |
Setloss | 1500 | Stop loss value (not used by this EA) |
TakeProfit | 5000 | Take profit value (not used by this EA) |
TslPoints | 1000 | Trailing stop distance (points, 10 points = 1 pip) |
TslTriggerPoints | 1500 | Profit points to activate trailing stop (10 pts=1 pip) |
InpMagic | 123456 | Magic number for identifying EA-managed positions |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.