COrdersManager class – library MetaTrader 4

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
📈 ROBOTFX MetaTrader Expert Advisors and Indicators to maximize profits and minimize the risks