Divergence usually requires price to be moving into a strongly overbought or oversold region. We then look to see when the price previously displayed similar strong movement. Ordinarily we require the price to move to an even more extreme level than the previous peak. Then we look at the oscillator peaks. If the oscillator fails to follow prices to new extremes we say the price diverges from the oscillator.
Nothing works every time and the same can be said about divergence.
Divergence provides no certainty that prices will reverse direction. Divergence can be followed by even more extreme prices. It detects that which it is programmed to detect. Programming to avoid false divergence signals will inevitably lead to screening out otherwise valid divergence signals. This is all part of the game.