
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 all,
I'm having trouble with stop orders in my MQL5 script and need some advice.
Buy Stop Orders Not Executing: I've set a buy stop order, but it's not executing. The price goes over the order price multiple times, but the order never gets filled.
Sell Stop Orders Executing Too Soon: On the other hand, my sell stop orders are executing right away on the next tick, even when the market price is nowhere near the order price. Or it get's pending like the buy stop, but at market price, but never get's executed.
Here's what I'm doing:
I've checked my code but can't figure out why this is happening, as I'm quite new to mql5, so the code is quite simple as well. Can anyone spot what I might be doing wrong or give some tips? Here's my code (it's just a code to test sending different types of order, later I will improve it to manage orders/positions):
Thanks for any help!