Don't raise your periscope all the way up. Use the page up/page down buttons to control how high you raise it, and just break the surface enough to see your targets. You stand a much better chance of not being seen that way.
If your torpedo wake is seen. the enemy ships will start turning away, and either speed up or slow down, so the closer you are, the less time they have to react. I usually shoot from 600-800yrds if possible.