MT4 Java History orders

easy direct connection to any MT4 and MT5 server

MT4 Java History orders

From and To parameters it’s server time, not local time. Some servers doesn’t interpret From and To time precisely so we recommend to subsctruct several hours from From time and add several hours to To time to get orders from required range with guarantee.

1 QuoteClient qc = new QuoteClient(2090221607, "OJgYhOfEF8", "demo.mt4tickmill.com", 443);
2 qc.Connect();
3 System.out.println("Connected. Balance = " + qc.AccountBalance());
4 for(Order order: qc.DownloadOrderHistory(LocalDateTime.now().minusDays(10), LocalDateTime.now().plusDays(1)))
5     System.out.println(order.Ticket + " " + order.Symbol + " " + order.Type);

2 Responses

  1. Forex Review says:

    Если не сложно, обрисуйте, пожалуйста, как осуществаляется связь MT4 c java. Я сам реализовал такую связь через dll и протокол TCP, поэтому интересно как это сделано у вас?

Leave a Reply