For preventing that different algos go short and long at the same time, you must use virtual hedging. Otherwise the algos don't know of each other. And IB is not suited for Z12 and Z2. You can see in the backtest that the high margin requirement of IB basically eliminishes all profits, even with no simultanous opposite positions. Z1/2/12 are designed for Forex/CFD brokers with high leverage.