vdemydiuk / mtapi

MetaTrader API (terminal bridge)
MIT License
529 stars 283 forks source link

Error on load MTConnector.dll in MTApi 1.15 - MT4 #254

Open matteuccimarco opened 3 years ago

matteuccimarco commented 3 years ago

Hello,

i built successfully from source code the entire solution in visual studio 2019. Then i run the MtApiInstaller.msi and, also, the MtApi_Setup.exe in a VPS where i have an instance of MT4. I followed all the instructions and i put the .ex4 in the right folder and also the other files like "json.mqh", for example, in the include folder. If i try to insert the Expert in a chart i get the attached error.

If i look at the chart window i can see the smile face for a while and then it disappers and, also, the 8222 port is not open.

Since today i had the 1.14 release installed and everything worked fine (same VPS). The OS is a Windows 7 Professional edition 64 bit.

Do you have any suggestions, please?

Thank you very much and best regards

20210422-error on mtconnector

vdemydiuk commented 3 years ago

May I ask to try install and test pre-built release https://github.com/vdemydiuk/mtapi/releases/tag/MT4-v1.0.43 ? Will it have the same error for your?

79kappak79 commented 3 years ago

Hi, i had the same problem but with the exe of your link now i can attach mtapi to chart. The problem now is that i can't connect. The function apiClient_ConnectionStateChanged is never call and the state is disconnected. Call to connect don't throw any exception.

Port of mtapi is setted to 8222.

Where is the problem? Thanks.

This is the code:

        _apiClient = new MtApiClient();
        _apiClient.ConnectionStateChanged += apiClient_ConnectionStateChanged;

        try
        {               
            _apiClient.BeginConnect("127.0.0.1", 8222);
        }
        catch (Exception ex)
        {
            throw ex;
        }

................... ................... private void apiClient_ConnectionStateChanged(object sender, MtConnectionEventArgs args) { string connectionStaus = args.Status.ToString(); }