@Override
    public void actionPerformed(ActionEvent e) {
        synchronized (accountConfig) {
            ExecutorService threadsPool = accountConfig.executorService;
            List<Future<?>> jobs = new ArrayList<>();
            for (final AccountVO accountVO : accountList) {
                System.out.println("=========accountVO:\t" + accountVO.getAccountText().getText() + "\t" + orderAction);
                if (accountVO.getTotalLotsForNextTrade() == 0.0) {
                    continue;
                }
                Future<?> future = threadsPool.submit(new Runnable() {
                    @Override
                    public void run() {
                        String maxLotsStr = accountConfig.getMaxLotsSpinner().getValue().toString();
                        MT4ConnectionUtil mt4Util = accountVO.getMt4ConnectionUtil();
                        String symbol = mt4Util.getSymbol();

                        double[] lots = OrderUtil.calculateOrderLots(accountVO.getTotalLotsForNextTrade(), Double.valueOf(maxLotsStr));
                        int maxTradeLots = Integer.parseInt(accountConfig.getMaxTradesSpinner().getValue().toString());
                        int num = 0;
                        if (orderAction == OrderAction.CLOSE) {
                            buttonStatusVO.setCloseOrder(true);
                            closeAccountOrders(accountVO, maxTradeLots);
                            buttonStatusVO.setCloseOrder(false);
                        } else {
                            for (double tradeLot : lots) {

                                num++;
                                if (num > maxTradeLots) {
                                    continue;
                                }

                                if (orderAction == OrderAction.OPEN_BUY) {
                                    mt4Util.orderSendAsynchronously(symbol, TradeOperation.OP_BUY, tradeLot, 0/*managed by MT4ConnectionUtil*/, 10, 0, 0, null, 0, null);
                                } else if (orderAction == OrderAction.OPEN_SELL) {
                                    mt4Util.orderSendAsynchronously(symbol, TradeOperation.OP_SELL, tradeLot, 0/*managed by MT4ConnectionUtil*/, 10, 0, 0, null, 0, null);
                                }
                            }
                            mt4Util.waitForAllJobsToComplete();
                            mt4Util.loadOrders();
                        }
                    }
                });
                jobs.add(future);
            }
            //
            waitForJobsToComplete(jobs);
        }
    }