forex software

Create and Test Forex Strategies

forex software

Skip to forum content

Forex Forum

Forex Software, Forex Strategies, Expert Advisors Generator

You are not logged in. Please login or register.


Forex Forum → Technical Matters → "wrong server name" if trying to import data from offline MT4

Pages 1

You must login or register to post a reply

RSS topic feed

Posts: 4

1 (edited by geektrader 2018-03-22 04:01:53)

Topic: "wrong server name" if trying to import data from offline MT4

Hi Dr. Popov,

here is another bug: if exporting data from an offline (not connected) MT4 instance via the "EA Studio Data Export script.mq4" and then trying to import the JSON files into EA Studio (drag & drop), EA Studio says "wrong server name" and won´t import the files. The problem (already investigated), is that in the resulting JSON files, there is no server name, they read:

..... ,"server":"","symbol":"AUDUSD", ........

If I change this to something like:

..... ,"server":"My Broker","symbol":"AUDUSD", ......

EA Studio imports the data just fine.

Reason: if MT4 is offline, the:

string server       = AccountInfoString(ACCOUNT_SERVER);

that you are using in the "EA Studio Data Export script.mq4" will return an empty string if MT4 is not connected to the brokers server.

I´d suggest that you either change the MQ4 code like this:

    string server       = AccountInfoString(ACCOUNT_SERVER);
    if (server=="") server="Unknown";

Or that you change it in EA Studio, so that if the string is empty, it will still add the data into EA Studio but under "Unknown" (or whatever).

Thanks :-)

Re: "wrong server name" if trying to import data from offline MT4

Good one!!

The code is updated. Please test it.

Re: "wrong server name" if trying to import data from offline MT4

Very fast :-) I will test it shortly, thanks a lot.

Re: "wrong server name" if trying to import data from offline MT4

Ah, you have updated the MQ4 code you mean, I thought the EA Studio code was updated instead, haha. All good, with the new MQ4 code it works now, of course. Thanks :-)

Posts: 4

Pages 1

You must login or register to post a reply

Forex Forum → Technical Matters → "wrong server name" if trying to import data from offline MT4

Similar topics in this forum