It's very odd that a broker doesn't execute orders in certain minutes. You should check the error codes before blaming the broker using GetLastError().
sunshineh:
Does anybody knows a better way for that, than putting my OrderSend- or the OrderClose-Function 4 times after below the first try?
What is the error ? there are specific actions you need to do depending on what the error is . . . Errors
For example, error 128 - "Timeout for the trade has been reached. Before retry (at least, in 1-minute time), it is necessary to make sure that trading operation has not really succeeded (a new position has not been opened, or the existing order has not been modified or deleted, or the existing position has not been closed)"
If you have no connection to your broker (Error 6) there is not much you can do about that . . . Error 2 you will need to investigate further and find the cause of it.
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Hi,
how are you handling the orders, if the OrderSend- or the OrderClose-Function returns -1?
I want my ea to open and close the order at a specific minute, and often the broker doesn't execute the orders in this minute.
Now I want my EA to try the OrderSend- or OrderClose-Function 4 times after the first try is failed.
Does anybody knows a better way for that, than putting my OrderSend- or the OrderClose-Function 4 times after below the first try?