How can I avoid this?
-
I set my EA to buy when candle close crosses the parabolic sar, but when it enters on the long side it gets filled on the ask, not the bid, and this is not always the close of the candle, but higher, you can see it better on the image. How can I avoid it? I want the EA to buy on the exact close price 0_1569980100866_Sin título.png
-
@marianomartinez I think the 9nly way to guarantee a maximum price for a trade is a limit order.
There will always be spread and/or slippage that will interfere hitting the desired price. -
Thanks for your answer phillips, what if I add this condition? Have you tried it?

-
@marianomartinez Is this a negative condition? If Bid > PSAR don't open trade? That may work for the current tick, but it doesn't mean it will be valid for the time when your order is filled.
Maybe better to have a max spread condition and avoid opening of trades if speads are to wide?! -
It's a positive condition, if Bid > PSAR the trade executes, it worked actually, at least most of the times. But I had to change to tick ID 0. It prevents false breakouts like the one I described in the first post.