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.

Bullish flag

Hi there,

I was wondering if anyone had a scan that can find bullish flags on the daily?

Comments

  • I put "flag" in the search box and found a couple

    https://scan.stockcharts.com/discussion/comment/2304#Comment_2304

    https://scan.stockcharts.com/discussion/1355/scanning-error/p1


    Some of the results were for wanting to "flag" results, but these two discussed scanning for flag type patterns.
  • markdmarkd mod
    edited September 20
    Finding any pattern is kind of hit and miss because most patterns have some irregularity - an extreme high or low, or too few bars or too many bars, etc. - that breaks the bounds of any conditions you specify.

    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.


Sign In or Register to comment.