Then the problem is with those 'bucket of trades' blocks. They work well on MT4 but not on MT5. It is a known bug. You will need to substitute them by pink 'for each position' blocks instead.