New Members: Be sure to confirm your email address by clicking on the link that was sent to your email inbox. You will not be able to post messages until you click that link.
I was wondering if anyone had a scan that can find bullish flags on the daily?
Some of the results were for wanting to "flag" results, but these two discussed scanning for flag type patterns.
Nevertheless, often you can play around with parameters and see what seems to work.
A flag is usually a series of bars that more or less goes sideways, so that means you could try using the highs and lows of recent bars to try to establish a range for those sideways bars.
I haven't tried this, but something like this might work:
and [min(7, close) > 7 days ago low]
and [max(5,close) < 5 days ago high]
So that would look for situations where the closes of the last few bars have stayed above a recent low and stayed below a recent high. You can tweak the 7 and 5 to see what works better, but probably the first number (the low) needs to be larger than the second number (high).
As you look over the results, you may find some additional conditions to narrow the results - maybe the close is greater than a moving average of some length, maybe the moving average is rising (today's MA is greater than x days ago MA), etc. Maybe there is some indicator behavior that coincides with the best results (maybe - certainly not guaranteed).
You won't get every flag, and maybe not everything you get will be a flag, or at least not a bullish flag, but with some tweaking you should probably get a pretty good balance between useful hits and junk.