I am exploring different ways to scan volatility contraction. At this moment I have used two different methods. First utilize historical volatility and check how that has change during different period e.g.
HV(BARS=25) / HV(BARS=5) > 3
Second method that I have used is BB/KC squeeze i.e. Bollinger bands are inside Keltner channel.
BBup = BB(STDDEV=2.0, BARS=20).UpperLine ; BBlow = BB(STDDEV=2.0, BARS=20).LowerLine ; KCup = KC(BARS=20, CONST=1,500000).UpperLine ; KClow = KC(BARS=20, CONST=1,500000).LowerLine ; v1 = BBup < KCup ; v2 = BBlow > KClow ; v1 and v2
I am curious to know what other possibilities Optuma scripting language offers and what might be best way to use historical volatility.