Download MetaTrader 5

How to close an existing order?

To add comments, please log in or register
Sudhanshu Gupta
40
Sudhanshu Gupta 2015.08.29 04:29 

If I have placed a BUY/SELL order and set takeprofit/stoploss  for that order, but I want to close that order before either condition meets, how do I close it programmatically?

Thank you in advance.

Marco vd Heijden
Moderator
4727
Marco vd Heijden 2015.08.29 08:19  
which platform?
Sudhanshu Gupta
40
Sudhanshu Gupta 2015.08.29 08:32  
Marco vd Heijden:
which platform?

meta trader 5

meta editor

Marco vd Heijden
Moderator
4727
Marco vd Heijden 2015.08.29 09:01  
Sudhanshu Gupta
40
Sudhanshu Gupta 2015.08.29 09:03  
Marco vd Heijden:

OrderSend

Hey,

Order Send is used to place an order.

How can I use OrderSend to close an existing order? Can you give an example.

Thank you

Marco vd Heijden
Moderator
4727
Marco vd Heijden 2015.08.29 09:09  

no its not.

if you want to close a position you open order in opposite direction. 

go read it. 

Sudhanshu Gupta
40
Sudhanshu Gupta 2015.08.29 09:27  
Marco vd Heijden:

no its not.

if you want to close a position you open order in opposite direction. 

go read it. 

Okay.Got it. Thank you for your time and help.
To add comments, please log in or register