This should not work. 4754 occurs when OrdersTotal is greater than zero, but OrderSelect or OrderGetTicket get screwed up.
This is very rare, but not in this case. The server/symbol is so specific here that the same thing happens with positions, only with error 4753.
Already prepared to have to make adjustments to the alternate bible, as the situations that arise pull a lot of logic down. For there you send a market order, it comes to the server, creates a position and closes it at the same millisecond. And the terminal receives information retroactively because of the ping.
I was pleasantly surprised that everything worked perfectly.
Server/symbol itself dodosil, error did not occur.
SZY The pose cannot be opened manually, only through MQL.
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.
the robot only stands on this chart but trades the same options as they do for robots
Insert this line.
put
but I don't think resetting the error will help.
but I don't think resetting the error will help.
Also.
I already did that and it worked.
But the fact of the error is still unresolved.
thanks so much for your help
while(eror==false&&step<10)
{
double bid=SymbolInfoDouble(symbolName,SYMBOL_BID);
ResetLastError();
eror=Trade.Buy(lot,symbolName,bid,0,0,comment);
step++;
Sleep(200);
if(eror==false)
{
Print("error - ",GetLastError());
if(GetLastError()==4754){OnInit();}
}
}
the fact of the error is unresolved.
That's why I suggested this option.
That's why I suggested this option.
Well, I'll give it a try.
But why doesn't the standard class work?
Well, I'll give it a try.
But why doesn't the standard class work?
If the alternative library works, it will become clear where to dig.
I can't reproduce the problem with each of the libraries.
I already did this and it worked.
while(eror==false&&&step<10)
{
double bid=SymbolInfoDouble(symbolName,SYMBOL_BID);
ResetLastError();
eror=Trade.Buy(lot,symbolName,bid,0,0,comment);
step++;
Sleep(200);
if(eror==false)
{
Print("error - ",GetLastError());
if(GetLastError()==4754){OnInit();}
}
}
This should not work. 4754 occurs when OrdersTotal is greater than zero, but OrderSelect or OrderGetTicket get screwed up.
This is very rare, but not in this case. The server/symbol is so specific here that the same thing happens with positions, only with error 4753.
Already prepared to have to make adjustments to the alternate bible, as the situations that arise pull a lot of logic down. For there you send a market order, it comes to the server, creates a position and closes it at the same millisecond. And the terminal receives information retroactively because of the ping.
I was pleasantly surprised that everything worked perfectly.
Server/symbol itself dodosil, error did not occur.
SZY The pose cannot be opened manually, only through MQL.
I meant that it helped that the robot didn't hang
I meant that it helped the robot not to hang
Then show OnInit. Right now it looks like nonsense.