Unfortunately, not always. If you don't connect for a long time, the terminal gives out "Account disable" and then you have to log in manually. This happens e.g. at a foundation where the servers are usually switched off overnight.
Dmitri Custurov: Unfortunately, not always. If you don't connect for a long time, the terminal gives out "Account disable" and then you have to log in manually. This happens e.g. at a foundation where the servers are usually switched off at night.
And in this case (with a long lack of connection), if you run the command "File" -> "Connect to trading account" in the window will be exactly the same trading account?
Dmitri Custurov: Hello all. I asked this question several pages ago, but I will try again. Is there any way to re-login my account when MT5 server connection is interrupted? Search on forums did not give anything.
If I restart the terminal, does it start with running EAs (I don't have the terminal installed, I cannot check)? If yes, then you can write a shell script that will do the restart. And pull this script from your EA.
Dmitri Custurov: Unfortunately, not always. If you don't connect for a long time, the terminal gives out "Account disable" and then you have to log in manually. This happens e.g. at a fund where the servers are usually switched off at night.
This is either a bug or a specific setup of the broker. Please contact Service Desk with this problem. It should not happen.
Can the developers comment on the promised, but unimplemented, ability to return a function value by reference? Have they not got around to it, or is there some difficulty with it?
Dmitri Custurov: Unfortunately not always. If you do not connect for a long time, the terminal gives out "Account disable" and then you have to login manually. This happens e.g. at a foundation where the servers are usually switched off at night.
Here is the script that brings up the "File" menu - "Connect to trading account" - click on the "OK" button - so the terminal will connect to the last trading account that was authenticated:
MQL4. The StringToCharArray() description says "Symbolically copies a string converted from unicode to ansi into a specified location of an array of uchar type". I have an impression that there is an error in the description. With this function, you can simply convert a character into a number corresponding to the code depending on the character encoding (the function has 5 parameters). I.e. there is no conversion "... from unicode to ansi..." here. Correct me if I'm wrong.
If I need to find code, for example, for € symbol for Ansi, then in place of 5th parameter I will write CP_ACP. If as UTF7, then CP_UTF7. If for Unicode, I use StringToShortArray() (see script).
#property strictvoidOnStart()
{
string a = "€"; // euro symboluchar ArrayAnsi[1], ArrayUTF7[1];
ushort ArrayUnicode[1];
int Count;
Count=StringToCharArray(a,ArrayAnsi,0,WHOLE_ARRAY,CP_ACP);
Print("1) € in Ansi = ",IntegerToString(ArrayAnsi[0]));
Count=StringToCharArray(a,ArrayUTF7,0,WHOLE_ARRAY,CP_UTF7);
Print("2) € in UTF7 = ",IntegerToString(ArrayUTF7[0]));
Count=StringToShortArray(a,ArrayUnicode,0,WHOLE_ARRAY);
Print("3) € in Unicode = ",IntegerToString(ArrayUnicode[0]));
}
Allow the use of cookies to log in to the MQL5.com website.
Please enable the necessary setting in your browser, otherwise you will not be able to log in.
You are signed in. Two-factor authentication has been disabled. Set it up again and scan a new QR code, or continue with two-factor authentication disabled.
Unfortunately, not always. If you don't connect for a long time, the terminal gives out "Account disable" and then you have to log in manually. This happens e.g. at a foundation where the servers are usually switched off at night.
Hello all. I asked this question several pages ago, but I will try again. Is there any way to re-login my account when MT5 server connection is interrupted? Search on forums did not give anything.
Unfortunately, not always. If you don't connect for a long time, the terminal gives out "Account disable" and then you have to log in manually. This happens e.g. at a fund where the servers are usually switched off at night.
Unfortunately not always. If you do not connect for a long time, the terminal gives out "Account disable" and then you have to login manually. This happens e.g. at a foundation where the servers are usually switched off at night.
Here is the script that brings up the "File" menu - "Connect to trading account" - click on the "OK" button - so the terminal will connect to the last trading account that was authenticated:
If everything works, I will clean up the code and post it in KodoBase.
MQL4. The StringToCharArray() description says "Symbolically copies a string converted from unicode to ansi into a specified location of an array of uchar type". I have an impression that there is an error in the description. With this function, you can simply convert a character into a number corresponding to the code depending on the character encoding (the function has 5 parameters). I.e. there is no conversion "... from unicode to ansi..." here. Correct me if I'm wrong.
If I need to find code, for example, for € symbol for Ansi, then in place of 5th parameter I will write CP_ACP. If as UTF7, then CP_UTF7. If for Unicode, I use StringToShortArray() (see script).
A bug in the compiler.
If you remove the F2 function, however, it compiles normally.
Compiler error.