Hi,
Following is my comment. Senior and other members will have have better explanation!
I do consider only recent swing high and low for divergence
For the reason that, Consideration of historical swing may be different structure..
Say, Accumulation and Distribution or profit book may mislead the divergence...
As long as HH, HL consider Bull trend and vice versa for Bear tender inline with price...
Cheers and Stay Green