How I was taught, and it works, is when the horse is bouncing around between the legs then you put both calves on and squeeze the horse forward. It shouldn't be a prolonged squeeze. Somewhere between 3-5 seconds. And you release the pressure as soon as the horse starts to go straight again. I ride dressage, so contact with the bit is part of this, and I would gently close my fingers on the reins while squeezing with my calves to tell the horse to straighten up between my aids. Again, pressure is released the very second the horse steps straight between my legs and reins.
In addition to this you can help the horse develop it's balance better by working on circles, leg yields on a circle, and frequent changes of direction (frequency depends on fitness and age of horse).
The stronger the horse gets physically, the better she'll get at staying between the aids. But for those times when she's starting to bounce between the left and right, then you need to create more forward energy. Usually the wobble is due to sucking back and evading engaging the hind-end and abdomen. Sometimes it's just baby confusion too, but forward will still help.