Hello Banzai,
Many years ago, a programmer friend of mine named GIO translated my divergence code for Metastock into MT5. I had thought about forming divergences by counting the number of bars up to a maximum of 9, but the best divergences form between 3, 4, and 5 bars.
Now, after so many years, I would like to make the following changes:
1) add the condition that, for a positive divergence, the Stochastic is ABOVE its 6 simple moving average, and that for a negative divergence, the Stochastic is BELOW its 6 simple moving average.
2) I would like a push notification to occur when this particular divergence appears.
3) I would like a push notification to occur when the bar following the divergence is inside (in this case, the movement is even more violent).
4) The cusp must also appear on the inside bar.
My Metastock code for divergence followed by an inside bar is on lines 159 and 163.
I attach 2 example images
I will put my formula in 3D too
mt4-divergence-indicators-list-how-good ... 97-90.html
Re: MT5 Stochastic indicators
52P.S. Sometimes the average is 9 periods long...
I hope someone will kindly make the changes above. Thanks in advance.
I hope someone will kindly make the changes above. Thanks in advance.
Re: MT5 Stochastic indicators
53--Divergence is undoubtedly one of the most stunning inventions in the trading world! It helps you accurately capture market turning points and effortlessly lock in profits right at the tops and bottoms—as if you’ve got the market’s pulse in your handstemporalmotif wrote: Wed Jan 07, 2026 11:12 pm @Mrtools
Hope you are doing well!
I forgot to mention for this indicator are you able to add a buy and sell color slope label under the color section for "signal" in the indicator.
Also can the divergence be catered for the signal line instead of the stochastic line mentioned above.
Originally you created this beautiful indicator
Kindest Regards
--That said, some traditional indicators are always chasing that illusory “certainty”. Admittedly, they shine brightly in frenzied bull or bear markets—but let’s be real, who can truly predict the market’s direction before it actually kicks off? The moment we hit ranging markets, these indicators fail miserably. They’ll have you selling at rock bottom and buying at sky-high prices, and it’s just heartbreaking to watch your trading capital shrink away
--This is exactly why divergence is so fascinating! It’s like an elegant dancer, hinting at trend reversals through the subtle discrepancies between price action and indicators.. plenty of veteran traders are diving deep into research on this, their efforts are significant and far-reaching.
--I sincerely hope all you trading gurus out there will keep digging deeper into the treasure trove of divergence. When I stumbled upon the [Stochastic color (mtf + divergence).ex5] indicator today, my eyes lit up immediately—it’s like a delicate key that unlocks brand-new possibilities in trading! If it could be further polished and optimized, it would be absolutely perfect