How to properly partially close my order?
-
I build an EA that should close 50% of volume on the Bollinger Bands Mid Line and the last 50% on the opposite band.
The problem is that when price hits the Mid Line it close the entire order and never reach the second contition.

-
This is the idea for buys only:
https://fxdreema.com/shared/gSlxsLrJ
You will need to duplicate it for sells. However, notice that there is no way for this structure to know if price moved back below the middle line after having crossed it above. This means a new partial close can happen before price hits the upper band.