MT5 connect to server

easy direct connection to any MT4 and MT5 server

MT5 connect to server

using mtapi.mt5;
using mtapi.mt5.wrapper;
using System;
 
namespace TestConnect
{
    class Program
    {
        static void Main(string[] args)
        { 
            var api = new MT5Client("209.222.26.5:443", 7371, "mt5api");
            api.OnConnectionStatus += Term_ConnectionStatus;
            api.Connect();
            Console.WriteLine("Account balance = " + api.Account.Balance);
            Console.WriteLine("Press any key...");
            Console.ReadKey();
        }
 
        private static void Term_ConnectionStatus(object sender, ServerStatus e)
        {
            Console.WriteLine(e);
        }
    }
}

Leave a Reply