the ideal place to shift is above the peak point in the graph. A close approximation is to shift at an rpm such that when you click the next gear it drops to an RPM that has a whp equal to what it was when you shifted. Plot a graph, account for your gear ratios and do some quick math and you'll know very close to the ideal shift point for each gear
The actual ideal shift point is calculated by finding the peak value of a graph when plotting the average value theorem of the HP curve from A (rpm you enter the next gear at) to B (rpm when you decide to shift) for a range of B from 0 to redline.
I hope this helps