Ping for depth?
Bad move they will certainly hear you. I never ping for depth ever. You can't be sure how far your ping will be heard and you can never be sure you have'nt missed something dangerous. Survival is your priority, stay out of shallow water.
As for range thats a tricky one. For me that depends on many factors...
Type of target merchant or warship?
Speed of target?
Steam, Electric or Homing Torpedo?
Is the target Zig Zagging?
The year?
General rule for survival vs kill ratio...
Early war : close, under 1000 meters.
Late war : distant, as far as I think the eel will run!