How do you ensure an order is placed?

MrChuckW
407

If a manual order hits the "invalid prices" the order does not place.

How do you code so that the order is placed, even if it encounters same? after all, the idea of programing is so I don't have to sit by the computer and make sure the orders are placed.

Brian Dee - Random Trader
1757

C

At its simplest, use what you find in this EA https://www.mql5.com/en/code/8714 to detect success of the OrderSend

You then add code to retry the order n times - dont forget to RefreshRates() before each attempt

Just Google for: mql4 reliable order and you'll get lots of ideas

If the EA is actively closing trades, best to handle errors there too!!

Good Luck

-BB-