Hi, i have some important questions to ask about slippage in my EA (using ECN broker and low timeframe):
1) If i put an OrderSend() function it actually and set the slippage to lets say 20 fractional pips, that means that if wont go in the trade if the price moves more than 20 fpips before the execution,but if will at any given value below?
2) If i set an OrderClose() to 20 fpips slippage what means that it wont close the order if the slippage gets above 20 fpips, so for an EA with only orderclose feature and no SL or TP set its best to put a huge number here like 99999999999 to close the order no matter what?
3) Are the SL or TP levels affected by the slippage? Lets say i put a predetermined SL or TP level and if a slippage would get normally to 50 fpips but the TP or SL level is below that, would the trade be closed by the SL/TP or by the OrderClose() ? So basically are the predetermined TP and SL levels also affected and delayed by the slippage or only the Ordersend and Orderclose orders in the EA?
4) What maximum slippage do you recommend to set on low timeframes like 1 and 5 min to my EA, on EUR/USD or GBP/USD pairs in fractional pips to the OrderSend() and OrderClose() functions?
Slippage may not be applicable with your Broker, have you tested ?
Yes, if i use ORDERCLOSE or ORDERSEND it will hve sometimes a delay.I know this because i marked the points where the conditions were approved to set a buy or sell order,and sometimes it executes the order 3-4 candles away.Or if i put a maximum slippage of 9999 then it will execute it many many candles away.
I have a more important question to ask:
Can i cheat out the slippage of the orderclose by this method? Let's say the EA wants to close an order, but the effective slippage is 3 pips, and the maximum slippage allowed to close it 2 pips.Will it close the order at 2 pip slippage if i put like 10 OrderClose() functions one after another at a maximum of 2 pip slippage?
I agree. But, just to clarify for the OP, there can be a small amount of slippage when closing an order via SL or TP (unless the broker guarantees the SL or TP prices).