If you have the Dud torpedo option enable then I recommend magnetic pistol in all of your shots, except when you are facing straight ahead the side of a ship (forgot proper name) and let the torpedo run at 0 meters so It can succesfully impact and don't bounce.
If using magnetic torpedos, always check the Keel depth (again need proper name) of the ship you are attacking and set the torpedo 1 or .5 meters below the dept of the ship...let's say HMS Aquitania her Keel depth is of 14.5 meters, so your magnetic torpedos should be set to 15 or 15.5 meters, also take in mind the weather, if you have rough seas the ship will most likely go up and down so if you the torpedo goes below while the ship is up the magnetic pistol won't activate

.
Also I noticed that the closer you are to a ship you will be able to indentify some parts of it and decide which part to attack...altough I could only see this using the UZO not the periscope