Don't forget about Stop Level!

I’m loathe to drop a link to an external source outside of BP, but this is such a good explanation of a problem that is so easy to run into, including code examples for how to avoid it for market, buy and sell limit, and stop orders. If you have an MT4 EA calculating order operation prices you should include these safeguards to avoid the infamous error 130.

https://www.earnforex.com/guides/ordersend-error-130/