A MetaTrader 5 Expert Advisor (EA) that temporarily removes stop-losses (SLs) from all open positions at a specified Start time and restores them at a specified End time. Ideal for traders who want precise control over SLs during high-volatility periods such as the daily spread hour or specific market events.
- ✅ Remove SLs from all open positions at a custom time
- ✅ Restore original SLs at a later custom time
- ✅ Works for both BUY and SELL positions
- ✅ Preserves Take-Profit (TP) levels, leaving them unchanged
- ✅ Runs on any chart, affecting all symbols in your account
- ✅ Fully configurable via input parameters
| Parameter | Description |
|---|---|
Start |
Time to remove SLs (HH:MM format) |
End |
Time to restore SLs (HH:MM format) |
Example:
Start = "15:30"→ Remove SLs at 3:30 PMEnd = "15:45"→ Restore SLs at 3:45 PM
IMPORTANT:
The EA uses the brokers time.
My prop firm (the5ers) uses UTC+3, so the default specified times are 23:50 (22:50 UTC+2) and 01:15 (00:15 UTC+2).
- Scans all open positions in your account.
- At
Starttime → sets SL to 0 (temporarily removed) - Records the original SL for each position
- At
Endtime → restores the original SLs while keeping TP unchanged - Operates once per tick for accuracy
- Place the compiled
.ex5EA into your MT5Expertsfolder:
MetaTrader 5\MQL5\Experts\
- Restart MT5 or refresh the Navigator panel
- Attach the EA to any chart
- Configure your desired Start and End times
⚠️ Make sure times match your broker server time
- The EA affects all open positions, not just the chart symbol
- SL removal is temporary — original SLs are restored automatically
- Test first on a demo account to ensure correct behavior
- During Spread Hour, to avoid getting stopped out in an area price never reached
- During major news events to avoid accidental SL hits
- Temporary removal of SLs to manage positions manually
Users can download the
.ex5from the Releases section of this repository
For issues or feature requests, please create an issue in this repository or add me on Discord @iamdevyy.