I agree with Sorrel and Saddlebag.
Your horse is swinging his hips out because he is dropping his inside shoulder. I would do some work away from the barrels first. This exercise will teach your horse to move off of your inside leg and teach him to pick up his shoulder.
I would do counterbending on a circle. You can start on a big circle to help teach it, then decrease your circle size. If your on a circle to the left pick up your outside rein tip his nose to the outside of the circle turn your wrist like you are opening a door and lift, this makes the shoulder lift. Since you have his nose to the outside of the circle he is going to want to follow his nose and you are going to keep him from doing so by applying pressure on his rib with your outside right leg. As soon as he softens in the bridle and moves off of your leg to maintain his path on the large circle release your cues and remain on the circle.when I first teach this I exaggerate my cues, so my left leg is nowhere near the horses side and will even carry my weight to the inside of the circle to encourage him to step underneath me to stay balanced. Soon all you have to do is pickup that rein and he will watch for your cues from your weight/seat and legs. I find it easier to teach it from a trot as well.
Once he completely understands the counterbend then I would apply it to the barrel pattern just like Sorrelhorse said. I would trot up to the barrel, if he ignores your cues for your pocket pickup that inside rein and counterbend him away from the barrel to reinforce that inside leg cue. Counterbend him all the way around until you are in your original position, then complete your circle around the barrel. I wouldt leave that barrel until he does it correctly. Leaving the barrel to go to the next is his reward.
Also like Saddlebag said don't look at your barrel, look where you want to ride your horse.