@rld51251 You just need to connect a 'close trades' block below the 'Check profit (unrealized)'. Once the amount of pips you are looking for is reached, all open trades will be closed. That 'bucket of trades' block is unnecessary.

I also recommend you to use candle ID 1 in all operands of all condition blocks.