StockFetcher Forums · General Discussion · cegis, your the best so<< >>Post Follow-up
muddytraks
40 posts
msg #31547
Ignore muddytraks
3/29/2004 8:02:28 PM

Im looking for a scan that will pick up stocks in a flag pattern. Is this possible?


cegis
235 posts
msg #31555
Ignore cegis
3/30/2004 8:33:50 AM

muddytraks,

Gee wizz! Thanks!! You make me blush! <G>

Sorry to say, I'm fairly new to TA, so I'm not familiar with the "flag pattern". If you care to describe it (in detail), I'll see what I can come up with. (Or, point me to a description somewhere...)

I find it fun and challenging to write queries (which is all a filter is...) to do things no one ever though possible! Generally speaking, if it can be described, it can be "programmed" into a filter. (There are some exceptions, as the filter syntax does not allow for some operations that would make any generalized query possible [based on what I've seen]...)

C


cegis
235 posts
msg #31587
Ignore cegis
4/1/2004 8:20:32 PM

muddytraks,

My curiosity got the best of me, and I found the flag pattern described at http://www.baresearch.com/education/technical_analysis/chart_patterns/continuation/bull_flag.php


Here's my attempt:

Fetcher[set{flagpole,5 day slope of close 6 days ago} set{fpvol,average volume(5) 6 days ago} set{flag,5 day slope of close 1 day ago} set{fvol,average volume(5) 1 days ago} flagpole is greater than 2 and flag is between -0.2 and 0 and fpvol is greater than fvol and close is greater than close 1 day ago]



Backtesting shows that it matches what appears to me (being a newbie flag pattern user) as some pretty good flags. Some with pretty good payoff, too!

From what I understand of flags, you could change some of the parameters that I used to make similar flag filters. For example, I used 5 days for the "pole" and 5 for the "flag". These could be changed to 4 or 6. You could also add conditions that todays close is greater than the "top of the pole", or similar.

So, did I live up to my reputation??? <G>

C


muddytraks
40 posts
msg #31608
Ignore muddytraks
4/4/2004 12:02:35 AM

Thanks for trying but zero results keeps comming up. MFCO & BGFV are in one right now 4/2/04. Thanks again


muddytraks
40 posts
msg #31609
Ignore muddytraks
4/4/2004 12:10:03 AM

Another way to discribe it would be a stock in an uptrend and consolidating around 3 month high levels.


muddytraks
40 posts
msg #31610
Ignore muddytraks
4/4/2004 12:30:02 AM

This captures a few but 90 % are not flags. SYMC is a perfect flag.

Show stocks where close reached a new 90 day high within last 6 days
and Average Volume(90) is above 250000
and close is between 1 and 250
and where the 6 day slope of the close is below .02


cegis
235 posts
msg #31624
Ignore cegis
4/4/2004 1:28:36 PM

muddytraks,

The filter that I posted did find some. For example, GOMD on 4/1 and MILL on 3/25. But, they are both under a buck. If you added the price and volume ranges shown in your filter, then it probably doesn't match a whole lot of stocks.

I also made a filter that used 4 days where my original filter uses 5 days, and it found a few others in the pattern. (I also changed the "flag is between -0.2 and 0" to between -0.2 and 0.02, which helped a bit.)

From what I understood of a flag, the "flag pole" had to be a fairly steep rise, hence the use of 5 day slope of close 6 days ago > 2. To me (newbie tech analyst that I am), a consolidation of an uptrend is something different than a flag, but I guess it doesn't matter a whole lot...

Let me take a look at the three stocks you mention, and see if I can come back with a refinement to my original filter - or, at least a reason why they didn't match the filter...

C


cegis
235 posts
msg #31625
Ignore cegis
4/4/2004 2:28:07 PM

muddytraks,

I think I discovered the error in my ways! I misunderstood the values returned by "slope of". Reading the Announcement of the feature, I found that a slope of 1 indicates that the value effectively doubled in the time period. (I was thinking that the slope was more like the algebraic(sp???) slope, where a slope of 1 would be at a 45 degree angle to the X axis...)

Obviously, then, a 5 day slope of close greater than 2 is gonna be a tough requirement!

Here's another try, with seemingly much better results (both quantity and quality - although there are a few matches that don't look too much like flag patterns to me...):

Fetcher[set{flagpole,close 5 days ago / close 9 days ago} set{fpvol,average volume(4) 5 days ago} set{flag4,close 4 days ago / close 5 day ago} set{flag3,close 3 days ago / close 5 days ago} set{flag2,close 2 days ago / close 5 days ago} set{flag1,close 1 day ago / close 5 days ago} set{fvol,average volume(4) 1 days ago} flagpole is greater than 1.1 and flag4 is between 0.95 and 1.05 and flag3 is between 0.95 and 1.05 and flag2 is between 0.95 and 1.05 and flag1 is between 0.95 and 1.05 and fpvol is greater than fvol and close is greater than close 1 day ago and price between 2 and 50 and volume 30 day low is greater than 100000 add column flagpole add column flag4 add column flag3 add column flag2 add column flag1 add column fpvol add column fvol]



This one looks for a 4 day rise of over 10%, followed by four closes all within 5% of the close 5 days ago (the top of the "flagpole"). As for your three candidate stocks, it only finds one - SYMC. MFCO apparently has too big of a daily swing during the "flag" portion, and BGFV only has a 3 day "flag". But, it DOES return some pretty nice flags! This filter could be copied to look for shorter, longer, wider or narrower flags, with "wider" or "narrower" flagpoles, then all grouped into a Watchlist...

To change this to a colsolidation of an uptrend, I'd probably go back to using slope (25 day slope of close 5 days ago > 1 [or .75] maybe?), and probably narrow the 5% band for the next couple of days (to maybe 2 or 3%?)...

Well, wadda ya think?

Oh, yeah, what do you use for entry conditions?

HTH, and thanks for the education.

C


StockFetcher Forums · General Discussion · cegis, your the best so<< >>Post Follow-up

*** Disclaimer *** StockFetcher.com does not endorse or suggest any of the securities which are returned in any of the searches or filters. They are provided purely for informational and research purposes. StockFetcher.com does not recommend particular securities. StockFetcher.com, Vestyl Software, L.L.C. and involved content providers shall not be liable for any errors or delays in the content, or for any actions taken based on the content.


Copyright 2016 - Vestyl Software L.L.C.Terms of Service | License | Questions or comments? Contact Us
EOD Data sources: DDFPlus & CSI Data Quotes delayed during active market hours. Delay times are at least 15 mins for NASDAQ, 20 mins for NYSE and Amex. Delayed intraday data provided by DDFPlus