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 Expert Advisor | Close Orders

Description:

This is a tool for you to automatically close all orders when you have dozens of pending orders and open orders.

For example, if now have 20 pending EUR/USD long and short orders, and have 20 open ones, and you now want to close them all, you should set as the following:

  • CloseOpenLongOrders = true;
  • CloseOpenShortOrders = true;
  • ClosePendingLongOrders = true;
  • ClosePendingShortOrders = true;
  • JustCloseSpecificMagicNumber= 0; // if set JustCloseSpecificMagicNumber to 0, will close all MagicNumber orders; if just want to close specific MagicNumber orders, set JustCloseSpecificMagicNumber to you magic value ;
  • CloseAllSymbols = true; // if set CloseAllSymbols = true, it will close all symbols satisfying the settings, if set CloseAllSymbols = false, just close the symbol you are applying this EA to;
  • JustCloseOrdersWithinTheRange = false; //if set JustCloseOrdersWithinTheRange = true, just close orders whose open prices are within the range CloseRangeHigh to CloseRangeLow.

MetaTrader Experts, Indicators, Scripts and Libraries

MetaTrader Experts, Indicators, Scripts and Libraries

10402

Best MetaTrader Indicators + Profitable Expert Advisors