Hi, all.
I just wonder why I suffer slippage when I close the order. My OrderClose() function is like below.
OrderClose(OrderTicket(),OrderLots(),TargetPrice,0,Red)
As you can see, I defined the target price (like a limit order) and I allowed '0' for the slippage as I didn't want to close my order in unfavorable price than TargetPrice.
But sometimes I found that my order was closed at worse price than the TargetPrice. This happens often. Is there anyone has a idea?
Thank you.
slippage is ignored in some order execution modes , at least in Market Execution ,afaik
slippage is ignored in some order execution modes , at least in Market Execution ,afaik
Hello, thanks for your comment.
Do you mean my '0' input to prevent slippage can be ignored? I really don't want to close my order below my target price...What could I do? Or...do I have to contact my broker?
Please do some researches before posting.
https://www.mql5.com/en/forum/31987
![What is the real purpose of Slippage in OrderSend Function? What is the real purpose of Slippage in OrderSend Function?](https://c.mql5.com/36/19/what-is-the-real-purpose-of-slippage.jpg)
- 2014.06.10
- www.mql5.com
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
Hi, all.
I just wonder why I suffer slippage when I close the order. My OrderClose() function is like below.
OrderClose(OrderTicket(),OrderLots(),TargetPrice,0,Red)
As you can see, I defined the target price (like a limit order) and I allowed '0' for the slippage as I didn't want to close my order in unfavorable price than TargetPrice.
But sometimes I found that my order was closed at worse price than the TargetPrice. This happens often. Is there anyone has a idea?
Thank you.