Let's go SetLastError!!! - page 6

 
charter:

No, I am not counting anything. I don't have a firm opinion, which is why I'm asking you to recommend the Most Worthy error-checking feature.

Vladislav has provided a template at the top, and then it's up to you to take action.
 
Roger:

I, for example, believe that it is enough to try to open an order 5 times and then stop trying, while you might think that you should try 20 times or open "to win".

I think you have to check each time to see if the conditions for opening coincide... if they don't change... as long as it doesn't freeze...
 
vit46:

Who do the inventors of MQL5 try so hard to setUserError for? They already reserved 65535 whole error codes for themselves, all the above ones are ok, you can arrange your own :)

Don't cling to the developers.

In MQL5 event model + OOP, you really need it there.

 
sergeev:

In MQL5 the event model + OOP, you really need it there.

It's just a more convenient approach to error handling... The event-driven model or OOP is not done to increase the number of errors, but on the contrary, to make life easier))
 
vit46:

I think I have to check every time to see if the conditions for opening match, and then it's a thousand times to win if they don't change... as long as it doesn't freeze...


If you are going to stupidly knock to the north brokerage company when you need to pause after an error, they will just turn off the auto-trading feature.

 
PapaYozh:


If you knock stupidly to the north of the DC when you need to pause after an error, you will easily get your auto-trading capability turned off.


Well, this is a stupid theory. In practice, after the third time the conditions will change and there will be no need to open for example :)
 
vit46:

I think I have to check every time to see if the conditions for opening match, and then it's a thousand times to win if they don't change... As long as they don't freeze...

I've seen several times an EA where the SL is set at the low of the previous bar and there is no check for closeness to the price. But if you think that your EA is flawless, you can go as far as to win. This just says that everyone has different criteria for error handling.
 
Roger:

Several times I've seen an EA where the SL is set at the Low of the previous bar, but there is no check for proximity to the price. But if you think that your EA is flawless, you can go as far as to win. This shows that everyone has different criteria when processing errors.

I would say that we must distinguish between programmer's errors in logic and errors that occur in the program... I think that's why they stopped calling them errors and gave them the proud name of exceptions :)
 
vit46:

I would say that you have to distinguish between programmer errors in logic and errors that occur in the course of the programme...
I don't see a technical difference.
 
Roger:
I don't see a technical difference.

Errors will always work, even if they seem to be working fine and exceptions will only occur under certain circumstances... like server failure, etc...