Shaun Downey divergence studies connect the relationship between the trend of bars and the smoothed by moving average trend of the underlying studies.
Each study from this group is signaled when the specified number of up or down turns of the bars and the moving average of underlying study goes in opposite direction.
You can select the type and period of the moving average.