Sheath your shield so you can do 2 attack directions, and maintain ridgid discipline, if you have people run or break then the whole formation falls.
But ultimately it will never match what it was in real life because weapons on M&B are not physical objects until you attack with them, the idle pike doesn't stop an enemy, they can walk right through it.
However if you've played commander battle you'll see it works for the bots, so try copying how they do it.