MT4 Script to Delete All Stop Loss and Take Profit Levels in One Click (DeleteSLTP)
When you have a dozen open positions in MetaTrader 4 (grid orders, hedges, or scaled entries), there are moments – right before major macro news or ahead of the weekend – when you want to clear every Stop Loss and Take Profit in one move. Editing ten or twenty tickets by hand is slow and error-prone; a tiny script called DeleteSLTP wipes all SL and TP levels in a single second.

Warning: this script removes Stop Loss and Take Profit levels from all open orders on the account – run it intentionally and test it on a demo account first.
Download the DeleteSLTP Script for MT4
Download DeleteSLTP.zip for MetaTrader 4
How to Install the Script in Modern MT4
Older MT4 versions stored scripts under experts\scripts, while current builds use the data folder:
- Extract
DeleteSLTP.zip. - In MetaTrader 4, click File → Open Data Folder.
- Open
MQL4\Scriptsand paste the script file there. - Restart MT4 (or right-click Scripts in the Navigator panel → Refresh).
- Make sure automated trading is allowed (Tools → Options → Expert Advisors → Allow automated trading), otherwise MT4 will block the script from modifying orders.

How to Run It
Find the script under Scripts in the Navigator pane, right-click it, and select Execute on Chart (or simply drag it onto any open chart). It runs once, clears all SL/TP levels, and unloads automatically.
If you need the opposite – automatically attaching a default Stop Loss and Take Profit to every new trade – check out my guide on an MT4 Expert Advisor that sets Take Profit and Stop Loss automatically.
For testing scripts safely on demo or cent accounts, RoboForex is convenient, and active traders can recover part of their spread via FxCash.
Disclosure: the RoboForex and FxCash links are affiliate links. Removing stop losses sharply increases account risk during volatility spikes – always manage exposure carefully.
It is a tiny utility, but whenever you are managing a stack of open positions and seconds matter, it beats clicking through twenty order dialogs manually.