When you say stimulation from oustide means do you mean porn? By far, the most common cause of ED in young guys today is Interent porn.
Over the last 5 years we have seen hundreds of men on our porn recovery forums with ED. Many in their teens and twenties. They stop porn - and limit masturbation - and they slowly recover their libido and erectile health. Most health professionals are unaware of this rapidly developing problem.
Internet porn can become an addiction, and with all addictions the brain changes, or adapts. It does not matter if the addiction is to a substance or whether it is a behavioral addiction, the same brain changes result.
Today's internet porn is nothing at all like our ancestors ever encountered, with the constant novelty and genres of extreme porn. Unlike yesterday's Playboy, Internet porn overstimulates the brain structures responsible for libido, erections, and addiction.
Brain changes include a drop in dopamine receptors in the reward circuitry. Reducing the amount of dopamine receptors decreases your pleasure response to "normal" stimuli. In other words, real-life sexual partners and previous porn won't excite your brain enough to get your penis going. Turning on dopamine receptors is how you get turned on.
Here are two excellent presentations, by a science teacher, on the effects of pornography on the brain. They are non-religious, non-judgmental, and science based.
Erectile Dysfunction and Porn:
http://yourbrainonporn.com/erectile-dysfunction-and-porn
Your Brain on Porn - Porn Addiction:
http://yourbrainonporn.com/your-brain-on-porn-series
Here are two articles on porn-induced ED
“How I Recovered from Porn-related Erectile Dysfunction”
http://yourbrainonporn.com/how-i-recovered-from-porn-related-erectile-dysfunction
As Porn Goes Up, Performance Goes Down?
http://yourbrainonporn.com/as-porn-goes-up-performance-goes-down
If this is your problem, there is a simple cure.
lifting weights and excersise could help, excerising, some herbal stuff (quality is important)...do you have the same problem masturbating. Worrying will make it worse. Ever injured your penis. jelqing? don't do that. i would see a dr. get some viagra