Halving an order after x amount of pips, until complete closure
-
I am developing a bot for investment, so with an average trade os several days, even weeks.
After putting a decent trailing stop, I am trying to close partially after an amount of pips, until complete closure of the trade: f.e. close 25% of the trade after every 50 pips, so after 200 pips trade is totally close.
But I am only getting a single exit, whatever amount % I put.
Here my snippet:

Any suggestion?
-
@alex81 Use separate pink trees for each pipa away, 1st tree 50 pips away close 25%, 2nd tree 100 pips away close ?%,3rd tree 150 pips away close ?%, 4th tree 200 pips away close all. The problem is % to close will be different for all trees to ensure it closes a quarter of the trade every time.
-
Go to the Examples and find one that is called Partially Close (every 10 pips)
I don't recommend using "once per trade/order", because it uses temporary memory. When you remove the EA, the memory is gone. Better try to understand this "Open Price belongs to..." option. Imagine the first trade (the parent) and the following remains of it (children) and work with that.
-