MT4 Trade Monitoring

easy direct connection to any MT4 and MT5 server

MT4 Trade Monitoring

With API you could monitor any trading activity making by all clients connected to this account. This functionality should be useful for trade copiers.

void Run()
{
   try
   {
      MainServer srv = QuoteClient.LoadSrv(@"GerchikCo-Demo.srv");
      QuoteClient qc = new QuoteClient(67611, "wx1yhpn", srv.Host, srv.Port);
      qc.OnOrderUpdate += new OrderUpdateEventHandler(qc_OnOrderUpdate);
      Console.WriteLine("Connecting...");
      qc.Connect();
      Console.WriteLine("Try to open/close trades on this account in MT4 terminal to see updates here. Press any key...");
      Console.ReadKey();
      qc.Disconnect();
   }
   catch (Exception ex)
   {
      Console.WriteLine(ex.Message);
      Console.WriteLine("Press any key...");
      Console.ReadKey();
   }
}
 
void qc_OnOrderUpdate(object sender, OrderUpdateEventArgs update)
{
   Console.WriteLine(update.Action + " " + update.Order.Ticket);
}

 

Leave a Reply