MT4 Java Pending order

easy direct connection to any MT4 and MT5 server

MT4 Java Pending order

Here we show how to put pending order with MT4 API Java.

1 String symbol = "EURUSD";
2 QuoteClient qc = new QuoteClient(2090221607, "OJgYhOfEF8", "demo.mt4tickmill.com", 443);
3 qc.Connect();
4 OrderClient oc = new OrderClient(qc);
5 System.out.println("Connected. Balance = " + qc.AccountBalance());
6 Order order = oc.OrderSend(symbol, Op.BuyStop, 0.1, 1.4, 0, 0,0 );
7 System.out.println("ticket " + order.Ticket);

Leave a Reply