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 Libraries | COrdersManager class

MetaTrader Experts, Indicators, Scripts and Libraries

It is a simple but good class for orders management. I know there should have been management of magic numbers and so on, this is just a taste.

Usage:

COrdersManager Orders;

Orders.DeleteAll();              // Close and delete all orders (open and pending)
Orders.CloseOpen()               // Close all open orders
Orders.CloseSell()               // Close all SELL orders
Orders.CloseBuy()                // Close all BUY orders
Orders.DeletePending()           // Delete all pending orders
Orders.CheckOpenOrders()         // Returns amount of open orders
Orders.CheckOpenBuyOrders()      // Returns amount of buy orders open
Orders.CheckOpenSellOrders()     // Returns amount of sell orders open
13706

Best MetaTrader Indicators + Profitable Expert Advisors