public void cancelPendingTrades() { IAppOrder[] appOrders = execution.getPendingOrders(); for (int i = 0; i < appOrders.Length; i++) { if (appOrders[i] != null && !AppObjectUtil.isOrderClosed(appOrders[i])) { appStgManager.getOrderManager().CancelOrder(appOrders[i].IBOrder); } } }