Your best 'window' for hitting the target is when it's at the -10<>+10 degree window (side-on) to you. In other words the ship AOB (Angle on Bow) is within the same window. (AOB = 80 to 100 degrees)
In the periscope view you'll notice a gyroangle indicator to the right of the scope. (The angle changes as you move your scope around) This is the bearing angle (relative to your sub direction) that your torpedoes will travel at.
As you've set up for straight ahead (0 degrees) and all the TDC data is automated, you just have to turn the scope until this gyro angle = 0.
All you now do is wait for the ship to cross your scope sights.. and fire.
(NB: don't forget to open the torpedo doors before you fire, otherwise there is about a 5 second delay before your torps go off, which can cause you to miss).
Now at any other angle (other than Zero) you have to calculate at which bearing to your sub where the target will be side-on (AOB=90), and use this as your gyroangle.