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...).