Download MetaTrader 5

Partial close?

To add comments, please log in or register
Vos77
169
Vos77  

Hi Forum,

Can anyone confirm that it is possible to scale into a position, buy1, buy2, buy3 then close half of each position on a closing signal, and the other half at the secondary signal?

example:

buy1 = 1 lot @ 0.89833

buy2 = 1 lot @ 0.89835

buy3 = 1 lot @ 0.89837

Average buy price = 0.89835

close buy 1.5 lots @ target 1.

close buy 1.5 lots @ target 2. 

 

Thanks everyone.

Vos77 

Andriy Moraru
1261
Andriy Moraru  
Sure, it's possible.
Biantoro Kunarto
15839
Biantoro Kunarto  
for partial close, you can use PositionSelect() and then close position with mrequest.volume = PositionGetDouble( POSITION_VOLUME )*0.5;
Documentation on MQL5: Trade Functions / PositionSelect
  • www.mql5.com
Trade Functions / PositionSelect - Documentation on MQL5
To add comments, please log in or register