Locker
Locker is a utility EA for MetaTrader 5 that manages trade locking (hedging) functionality, allowing traders to lock floating profits or losses by opening opposite positions. It serves as a position management tool rather than an autonomous trading strategy, providing semi-automated control over existing trades through lock/unlock operations.
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
This EA is not an autonomous trading strategy but rather a position locking management utility. Its core concept involves opening opposite positions of equal lot size to existing holdings, thereby freezing current floating profit or loss. Entry conditions are based on user manual triggers or preset conditions for the locking operation, not on technical indicator signals. Exit conditions are similarly user-controlled, executing unlock operations to close opposite positions and restore the original exposure. In terms of position sizing, the lock position's lot size matches the original position to ensure a complete hedge. Regarding money management, the EA does not implement independent money management logic since it does not proactively open new trades but only manages existing positions. Overall, this tool is suitable for experienced traders looking to protect profits or limit losses in volatile markets.
Strengths
- Provides flexible position locking functionality to help traders protect existing profits in uncertain markets
- Supports both manual and automatic locking modes, adapting to different trading styles and needs
- Complete hedging mechanism effectively freezes floating P&L, reducing emotionally-driven trading decisions
- Simple and intuitive operation, suitable for traders of all experience levels
Weaknesses
- Locking occupies double margin, potentially affecting account available funds and trading capacity
- Frequent locking and unlocking may increase trading costs (spreads and commissions)
- Lacks autonomous trading capability, relying on user judgment and operation, not beginner-friendly
- In extreme market conditions, locking may not execute precisely due to slippage or insufficient liquidity
Possible improvements
- Add a visual panel displaying current lock status and P&L information to improve user experience
- Integrate a compound protection mechanism linking trailing stops with locking for more flexibility in trending markets
- Add multi-symbol batch locking functionality to improve management efficiency for multi-instrument portfolio trading
Risk assessment
Overall risk: Low
- Locking itself does not create directional risk, but double positions occupy more margin
- Auto-locking may trigger at unfavorable points if parameters are improperly set
Evaluation scores
Parameters
| Parameter | Default | Description |
|---|---|---|
LockType | 0 | Lock type: 0 = full lock, 1 = partial lock |
MagicNumber | 123456 | EA magic number to identify its own orders |
LockPercent | 100 | Lock percentage, 100 = full lock, adjustable for partial |
AutoLock | false | Enable auto-locking feature |
LockProfit | 0 | Profit threshold to trigger auto-lock |
UnlockOnSignal | false | Auto-unlock on trading signal |
Similar Utility EAs
Backtests are historical simulations and do not guarantee future results. Not financial advice.