....I've played as the Greeks and other factions who use Phalanxes, and I've never had to *stop* them in order to have them attack effectively. Using Phalanxes defensively can be counter productive, as the enemy can make you fight on their terms, and that can be a dangerous hame for you the phalanx user. If you force them to fight up front on the line, then you've won already.

The way I deploy and re-deploy my phalanxes is really simple. If on offensive, I take my hoplites in standard formation and rush them to a spot I know where they wont meet the enemy, let's say two thirds of the way between you and the enemy, then deploy them in phalanx formation into the spots where I wish them to begin their attack.

Then I march them forward to bring the fight to the enemy. Something that is very very *very* useful is the spacebar. Make very good use of it, and by way of the purple arrows, estimate where your men are going, when they get there, and most importantly which way they will be facing.

When Phalanxes turn to their right or left flank, they raise their spears as they march in formation. When they begin marching forward they lower them.

Your problem seems to me that your frantically turning your men all around. Use the spacebar key. If it appears that your men are going to be turning because of some stupid pathfinding thing, pause the game, and by way of drag-deploying (when you drag and can adjust the formation depth) make them go to the proper spot, facing the proper direction.