select order by ticket to partial close
-
hi, i have a question, how do i select the exact order (without For Loop function) by ticket to close a position partially. i had used the pink partial close block but it didn't close the position which i want to close in the first place.
so for the ilustration (this is hedging system btw):
- there are 1 buy and 1 sell with equal lots, both flatten each other
- when the buy order hit "take profit", i want to close some part of the sell order.
- then place a buy stop with the same lots as the sell order with the remaining lots.
is it possible? thanks in advance
-
@yogajangkung You will need a variable to store the value of the new lot size and then use this in the 'on trade' tab:
-
@l-andorrà so what's the difference between in loop order and on trade event data?
-
A loop working in the on tick tab will be executed every single tick arriving to the MT4 whereas using it in the 'on trade' tab will execute it just once, when the trade is open/closed/modified and will wait until that happens again.