It is sad I am trying to make an EA with two functions (setting positions and reopening a position after it has closed at TP or SL but it needs to open together with the opposite position)
i can't even get such a simple EA to work, i've tried on forums too ((
What happens (question to the author) if OrderCheck(request,check) function returns false at some stage? For example, because of specifying incorrect volume for request.volume.
G001: Please advise how to check and get rid of the infinite loop.
There could be many options. Limit the number of iterations, abandon loop checking altogether, analyse the response code, etc. By the way, an infinite loop will also occur if the server rejects the trade request for some reason. I.e. the check logic must be changed completely.
I myself use no more than two checks of return codes and if the order cannot be placed, I wait for the arrival of a new tick.
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.
Right. That was my request, how to know programmatically when the EA stops working.
and call it "thank you, everyone, problem solved,"
You created it for yourself, not solved it ;)
:))) yeah.
and call it "thank you, everyone, problem solved,"
You created it for yourself, not solved it ;)
It is sad I am trying to make an EA with two functions (setting positions and reopening a position after it has closed at TP or SL but it needs to open together with the opposite position)
i can't even get such a simple EA to work, i've tried on forums too ((
you did, but you're ignoring it. ;)
you don't put prints and comments in cycles, you don't give a magazine.
You need to communicate here, not blame it on the terminal.
I noticed this part of the code:
What happens (question to the author) if OrderCheck(request,check) function returns false at some stage? For example, because of specifying incorrect volume for request.volume.
I noticed this part of the code:
What happens (question to the author) if OrderCheck(request,check) function returns false at some stage? For example, because request.volume is wrong.
There could be many options. Limit the number of iterations, abandon loop checking altogether, analyse the response code, etc. By the way, an infinite loop will also occur if the server rejects the trade request for some reason. I.e. the check logic must be changed completely.
I myself use no more than two checks of return codes and if the order cannot be placed, I wait for the arrival of a new tick.