That's a nice indicator you've shared. A couple of things make this one unique to the other Stochastic divergences indicators is this one seems to take account inside bars (line 579 of the code) so if a divergence occurs current bar is inside the previous bar's range, it'll maintain the signal.uradello wrote: Mon Jan 12, 2026 9:18 pm I'd like to contribute my own take on the Stochastic Divergence indicator I programmed many years ago in Metastock, which a friend of mine then kindly translated into MT4 and MT5.
The MT5 version can be found here:
post1295578880.html#p1295578880
The divergence is created by counting the number of bars on the price and the Stochastic, up to a maximum of 9 (anything beyond that wouldn't make sense...).
Essentially a multi-bar divergence detector. Eg. it will check if the current low is the lowest in the last 10 bars, not just the current or last bar.
I've added it to our divergences indicator list and have been checking it out using a 34, 3, 3 setting to slow it down a bit: