orderclose - bid or ask for buy or sell ?

 

hi guys

what is the correct bid / ask usage when closing buy or sell orders: is the correct ?

OrderClose(OrderTicket(),OrderLots(),Bid,slippage,CLR_NONE); ----- buy orders

OrderClose(OrderTicket(),OrderLots(),Ask,slippage,CLR_NONE); ----- sell orders


thanks

 
buju:

hi guys

what is the correct bid / ask usage when closing buy or sell orders: is the correct ?

OrderClose(OrderTicket(),OrderLots(),Bid,slippage,CLR_NONE); ----- buy orders

OrderClose(OrderTicket(),OrderLots(),Ask,slippage,CLR_NONE); ----- sell orders


If you are using OrderLots() you must have already used OrderSelect() to select your order . . so you can just use OrderClosePrice()

OrderClose(OrderTicket(), OrderLots(), OrderClosePrice() , slippage, CLR_NONE); //  <----- for Buy & Sell Orders

but to answer your Q. A Buy is closed with a Sell at Bid, a Sell is closed with a Buy at Ask.

 
RaptorUK:


If you are using OrderLots() you must have already used OrderSelect() to select your order . . so you can just use OrderClosePrice()

but to answer your Q. A Buy is closed with a Sell at Bid, a Sell is closed with a Buy at Ask.


working now, thank you, btw its blooming snowing here in South Africa - Johannesburg !