Download MetaTrader 5

how to close a position

To add comments, please log in or register
Download MQL5 library codes via MetaTrader. It is convenient!
zartan
650
zartan 2014.03.31 10:33 

my EA need to close a position (not with stop loss)

example : i want to close my position Friday before the week-end to avoid surprises on Monday

i don't find any function for this.

am i obliged to send several orders (if volume >50 on forex) n?

thank's  

Dua Yong Rew
5424
Dua Yong Rew 2014.03.31 12:45  
zartan:

my EA need to close a position (not with stop loss)

example : i want to close my position Friday before the week-end to avoid surprises on Monday

i don't find any function for this.

am i obliged to send several orders (if volume >50 on forex) n?

thank's  

Just check the day and time and send a close
Alain Verleyen
Moderator
30737
Alain Verleyen 2014.03.31 12:52  
zartan:

my EA need to close a position (not with stop loss)

example : i want to close my position Friday before the week-end to avoid surprises on Monday

i don't find any function for this.

am i obliged to send several orders (if volume >50 on forex) n?

thank's  

If you have a open BUY (SELL) position, send a SELL (BUY) order with same volume as your position some minutes before the close.
zartan
650
zartan 2014.03.31 14:59  
Just check the day and time and send a close

what' a close ? it's like say angevoyager ?

it don't exist function to close a position ? 

If you have a open BUY (SELL) position, send a SELL (BUY) order with same volume as your position some minutes before the close.

 thus, if i have a volume > 50, i need to send several order ?

thank's    

Alain Verleyen
Moderator
30737
Alain Verleyen 2014.03.31 16:17  
zartan:
Just check the day and time and send a close

what' a close ? it's like say angevoyager ?

it don't exist function to close a position ? 

If you have a open BUY (SELL) position, send a SELL (BUY) order with same volume as your position some minutes before the close.

 thus, if i have a volume > 50, i need to send several order ?

thank's    

Yes, if it can't be done with one order.
To add comments, please log in or register