@Buckbull He sure does, here is the companion bear flag scan. Hope this helps
# Bear Flag on Pole - SCAN
# Mobius
# V01.02.2014
# Price trend - Downward leading to the pattern. The price should fall for at least 2 months.
# Shape - A consolidation pattern forms. It usually doesn't look like a flag or pennant, just a pause in the price decline.
# Volume - Recedes for best performance
# Confirmation - The pattern confirms as valid when price closes below the lowest trough in the pattern.
def o = open;
def h = high;
def l = low;
def c = close;
def BBl = BollingerBands().LowerBand;
def KCl = KeltnerChannels().Lower_Band;
def downward = isDescending(close, 42);
def p = (c[42] / lowest(l, 21)) > 1.2;
def squeezeLow = if BBl < KCl
then squeezeLow[1]
else if BBl crosses above KCl
then l
else if BBl > KCl and l < squeezeLow[1]
then l
else squeezeLow[1];
def NotSqueeze = BBl < KCl;
plot Flag = if downward and
p and
NotSqueeze and
close crosses below squeezeLow
then 1
else Double.NaN;
# End Code Bear Flag