You dont neccessarily want to shift at peak hp. Just because the power starts to flatten or even drop a little isnt reason to shift.
What matters is the actual power generated at that mph, vs what youd get in the next gear. If say in second gear power falls off from 400hp at 5800 rpm to 380hp at 6000rpm, your still better rev'ing to 6000rpm if shifting to third meant you'd be making less than 380hp. What matters is the area under the power curve.
Of course this is a function of your power curve. Optimal shifts points are easily calculated from a dyno chart (with the gears ratios of your tranny).
You obviously don't wanna rev the balls out of a stock supercharged motor though.