The "Invalid price" error occurs because the price in the order is no longer a currently executable price. Common causes include:
- The EA used an outdated price: the market price changed between the time the EA calculated the order and the time it sent it.
- The EA used the wrong side of the price: for example, it used the Bid price instead of the Ask price when buying.
- Fast-moving market: around major data releases or market open, prices change quickly, so the price at the time of submission can easily become outdated.
- Network latency or an unstable connection: the quotes received by the terminal lag behind the server, so the price sent is naturally invalid.