One Cancel Others script for MetaTrader 5

This simple script without parameters is used in cases when, for example, the orders are set on the breakthrough (the breakthrough from boundaries) of the channel and when one order is triggered, the other must be canceled.


  • The script works only with the orders by the symbol, to which chart it is attached.
  • Supposed that the orders have already been set.
  • Supposed that there is no open positions to the given symbol.
  • When one order is triggered, the script deletes all (!) remaining orders on the current symbol and exits.
  • If the symbol has no pending orders, the script will exit.

Simply said, this script helper is designed for using in manual trade. It does not set orders, but only deletes. Thus the trader has no need to follow the fact of execution of one of the pending orders.

Free Download

One Cancel Others script for MetaTrader 5

MT5 Forex Script Characteristics

Platform: Metatrader 5

Type: Script

Time frames: any.

How to install Screenshot Script in MetaTrader 5 / MT5:

Copy and paste the oncecancelotherscript.mql5 files into the MQL5 Scripts folder of the Metatrader 4 trading platform.

Restart your MetaTrader 5 application (assuming it’s currently open) … or Launch your MetaTrader 4 application

You can access this folder from the top menu as follows:

File > Open Data Folder > MQL5 > Script (paste here)

On the left hand side, look for the “Navigator” window and under the “Common” tab, look into the “Scripts” section

Locate the indicator which you have just downloaded into the folder stated in Step 1

Drag (Click and drag) the Script onto the chart (when you want the task to be performed)

your task should now be executed…

Leave a Comment