OP_BUY Ask with TP and SL Bid or TP and SL Ask ?

 
Hi coders


OP_BUY Ask should TP and SL be Bid or TP and SL Ask ?

Normally when trading manually I would say simply you are Buying at the Ask price and Selling at the Bid Price no problem there.
But never really considered what is typical for an EA ?

Thanks



 

Buy: open at the Ask, close at the Bid. TP/SL are relative to the Bid.

Sell: open at the Bid, close is at the Ask.

Mql4 charts are Bid charts. You will see buy opens above the high of the candle/bar (Ask above high) and likewise Sell hitting SL above the high and TP not triggering when bid goes slightly below TP.