• Overview
  • Reviews
  • Comments

Close Open Orders

The script closes all orders, or selected orders using a filter. This function will be useful if you are trading with a large number of open orders. You can close any number of orders with the specified filter in one motion, or simply close all orders. You no longer have to go through all the orders individually and click on each one manually. Instead, you drag the script to a chart or double-click it, while the script will do all the rest for you. The script automates the process and saves time and money. Do not forget to allow automatic trading in the terminal. To do this, select the option "Enable automatic trading" in the Experts settings in the MT4 platform Options menu, or click the "Enable automatic trading" button on the terminal panel.


Capabilities

  • Close orders by "magic"
  • Close orders of current pair or all pairs
  • Close only profit or loss orders
  • Close only open orders SELL
  • Close only open orders BUY
  • You can combine the filter of closing open orders BUY / SELL with a filter of the current pair, magic, as well as losing and profitable orders
  • Delete pending orders along with market orders or separately
  • Delete only pending orders BUY
  • Delete only pending orders SELL
  • You can combine the BUY / SELL closing filter of pending orders with market order filters
  • Selection of the number of attempts to close the order, a pause between attempts, slippage
  • Automatic notification if trade is not allowed

*Note: The script is intended only for closing positions.

**Note: Some orders may remain open if the market does not work, there are no quotes or automatic trading is prohibited in the terminal.


Options

  • magic - close orders only with the specified "magic" (by default - 0 - off)
  • all_SYMBOLS - close all orders in all pairs (if "False" - will be closed only orders on the current pair )
  • close_ALL_open - close all open orders
  • close_only_BUY - close only open orders BUY
  • close_only_SELL - close only open orders SELL
  • delete_pending_orders_ALL - delete all pending orders
  • delete_pending_orders_SELL - delete only pending orders SellLimit and SellStop
  • delete_pending_orders_BUY - delete only pending orders BuyLimit and BuyStop
  • close_only_PROFIT_orders - close only profit orders
  • close_only_LOSS_orders - close only loss orders
  • try_again - number of attempts to close the order
  • delay_for_try_again - delay between attempts to close an order
  • slippage - maximum allowable slippage (default is 0)


Requirements

  • Recommended pairs: all pairs
  • Timeframe: any
  • Platform: MetaTrader 4
No reviews