Expert Advisors • Indicators • Scripts • Libraries

MQL.RobotFX.org is the biggest collection of MetaTrader expert advisors (MT5 & MT4), indicators, scripts and libraries that can be used to improve trading results, minimize risks or simply automate trading tasks

MetaTrader 4 Script | CloseMultipleOrders

A simple script to close multiple market orders.

Input parameters:

  • ClossAll -> If this parameter is set to true, all orders (Buy, Sell, Pending orders) are close. This parameter supercedes every other.
  • CloseBuyOders -> Closes only Buy orders. If 'CloseOnlyProfit is set to true it closes only Buy positions in profit.
  • CloseSellOrders -> Closes only Sell Orders. If 'CloseOnlyProfit' is set to true it closes only Sell positions in profit.
  • CloseBuyLimits -> Delete all BuyLimit pending orders if set to true.
  • CloseSellLimit -> Delete all SellLimit pending orders if set to true.
  • CloseOnlyProfit -> Will close only trades in profit. If 'CloseAll' is set to true, this parameter will be ignored and all trades will be closed
  • Slippage -> The minimum allow Slippage. Leave current settings intact if unsure of slippage to apply.

MetaTrader Experts, Indicators, Scripts and Libraries

Please make sure you enable automated trading in your terminal, as the figure below, for scripts to function.

MetaTrader Experts, Indicators, Scripts and Libraries

12107

Best MetaTrader Indicators + Profitable Expert Advisors