StockFetcher Forums · Filter Exchange · Range Contraction/Expansion Filter<< 1 2 3 4 5 ... 12 >>Post Follow-up
alf44
2,025 posts
msg #38839
Ignore alf44
modified
11/12/2005 12:53:50 AM

The principles of Contraction and Expansion are a Market phenomenon where prices go from a period of rest (coiling) to a period of strong movement (uncoiling) !

----------------

Wide Range Days - WR4s & WR7s - (Range Expansion Days) represent an increase in Price Volatility and tend to follow Narrow Range Days - NR4 & NR7s - (Range Contraction Days) !

A WR4 is a day in which today's daily range (today's high price minus low price) is wider than the previous 3 days !

A WR7 is a day in which today's daily range (today's high price minus low price) is wider than the previous 6 days !

The significance of these patterns is that they represent an expansion in Price Volatility. In most cases the day following a WR Day is a classic fading day.

Short-term traders can often buy or sell a test of the WR4/WR7 day's High or Low, on the following day for a scalp trade. When tests of prior (intraday and prior days) HIGHS are made you will want to go SHORT. When tests of prior (intraday and prior days) LOWS are made you will want to go LONG. However, a WR Day that Opens in the bottom/20%/top/80%...of it's range and Closes in the top/80%/bottom/20%...of it's range...can be expected to have follow-through at the next days Open. These are somtimes referred to as 80/20 days or 90/10 days (ie. Trend Days)!

-----------------

Narrow Range Days - NR4s & NR7s - (Range Contraction Days) represent a decrease in Price Volatility and tend to follow Wide Range Days - WR4s & WR7s - (Range Expansion Days) !

An NR4 is a day in which today's daily range (today's high price minus low price) is narrower than the previous 3 days !

An NR7 is a day in which today's daily range (today's high price minus low price) is narrower than the previous 6 days !

The significance of these patterns is that they represent a decrease in Price Volatility. Range Expansion and an increase in Price Volatility tend to follow an NR Day. A "breakout" mode strategy is often used when the market has had some form of Range Contraction. A Trend Day, or large Range Expansion Day, often follows periods of Range Contraction, or small average daily ranges. When in breakout mode, use strategies to enter in the direction the market is moving, instead of waiting for a reaction in the price. This can be something like a multiple of the previous day's range added/subtracted to the Open. That could be your entry. You could use some multiple of ATR. Whatever your preference and risk tolerance demands.

-----------------

Inside Days (IDs) and Outside Days (ODs) are other examples of these Contraction/Expansion Patterns.

Also, Windup Patterns (WUps) (that is an Outside Day followed by an Inside Day) are always good to watch out for !

And...Shark Patterns (that is 3 consecutive Inside Days) are another one I like to screen for !

The following scan filter is a sort of "One Stop Shop" for most of the Contraction/Expansion Patterns that I've mentioned here.

THIS ONE FILTER will scan for: NR4s, NR7s, WR4s, WR7s, IDs, ODs & WUps !

It can be applied to the entire Universe of Stocks...

...you can run it to scan any of your particular Watch Lists...

...or, you can do as I've done here...run it on the NASDAQ 100 (for example) !

It will return ALL of the patterns I've discussed in this post...and it will do it within the parameters of this ONE FILTER !

-----------------

Fetcher[/* Range Contraction/Expansion Scan Filter */

/* IDs (Inside Days -> H/L range inside H/L range 1 day ago) */
set{IDhi, count(High below High 1 day ago, 1)}
set{IDlo, count(Low above Low 1 day ago, 1)}
set{ID, IDhi * IDlo}

/* NR4s (Narrowist Range of the last 4 days) */
set{NR4, count(Day Point Range reached a new 4 day Low, 1)}

/* NR7s (Narrowist Range of the last 7 days) */
set{NR7, count(Day Point Range reached a new 7 day Low, 1)}

/* WR4s (Widest Range of the last 4 days) */
set{WR4, count(Day Point Range reached a new 4 day High, 1)}

/* WR7s (Widest Range of the last 7 days) */
set{WR7, count(Day Point Range reached a new 7 day High, 1)}

/* ODs (Outside Days -> H/L range outside H/L range 1 day ago) */
set{ODhi, count(High above High 1 day ago, 1)}
set{ODlo, count(Low below Low 1 day ago, 1)}
set{OD, ODhi * ODlo}

/* Windups (Outside Day followed by an Inside Day) */
set{WUp_ODhilo, count(High 1 day ago above High 2 days ago, 1)} * count(Low 1 day ago below Low 2 days ago, 1)}
set{WUp_IDhilo, count(High below High 1 day ago, 1)} * count{Low above Low 1 day ago, 1)}
set{WUp, WUp_ODhilo * WUp_IDhilo}

set{I_Day, ID * 1}
set{NR_4, NR4 * 1}
set{NR_7, NR7 * 1}
set{WR_4, WR4 * 1}
set{WR_7, WR7 * 1}
set{O_Day, OD * 1}
set{W_Up, WUp * 1}

set{A1, I_Day + NR_4}
set{A2, A1 + NR_7}
set{A3, A2 + WR_4}
set{A4, A3 + WR_7}
set{A5, A4 + O_Day}
set{A6, A5 + W_Up}

Show all stocks where A6 is above 0 and
Average Volume(65) is above 500000 and
Market is Nasdaq 100

add column ID
add column NR4
add column NR7
add column WR4
add column WR7
add column OD
add column WUp

sort column 5 descending

chart-time is 3 Months
]



-----------------

The Shark Pattern is one I will be looking to add to this filter as soon as possible. I'll be trying to tweak this more as time allows but this is at least a good beginning. Please, if anyone sees something I can add to improve on this don't hesitate to mention it ! The WindUp portion of the filter still may need a little work ! I'll look at it more this weekend.

Of course, I would be remiss if I didn't mention TRO, cegis et al... It was through watching and learning from them that allowed me to put this thing together ! fwiw


Regards,

alf44



alf44
2,025 posts
msg #38840
Ignore alf44
11/12/2005 1:02:34 AM

...looks like you may have to copy and paste this thing into a separate filter window to get it to run !

The link doesn't appear to be working !

Bummer !

Oh well...cut and paste...it WILL work that way !


Regards,

alf44




alf44
2,025 posts
msg #38841
Ignore alf44
11/12/2005 1:22:04 AM

...rebooted and tried again (a few times)...

..it doesn't run as it's supposed to UNLESS you click "more" and then cut n paste the entire thing into another window.

Don't know why that is but.........

Oh well, what are ya gonna do ?


Regards,

alf44





Railwhore
69 posts
msg #38846
Ignore Railwhore
11/12/2005 1:35:31 PM

Click on the Magnifying glass


alf44
2,025 posts
msg #38847
Ignore alf44
11/12/2005 2:13:56 PM

Railwhore,

Thanks !

I swear I DID try that last night (err...this morning I should say).

It didn't seem to work. Guess I was hallucinating...again ! lol

Thanks again !

There seems to be a bit of a glitch in the "Windup" part of the filter. It sometimes indicates a "Windup Pattern" when there isn't one there. I'm trying to work on that but would appreciate any advise you or others can give.

I DO like this idea though ! Having ONE FILTER that screens for 7 different patterns !

I'm also adding a few of the things I like to look at...to provide a clearer "context" and "bias" from which to make a trading decision on these patterns.


Regards,

alf44




alf44
2,025 posts
msg #38853
Ignore alf44
11/12/2005 5:48:08 PM

...rather...appreciate any "advice" !




alf44
2,025 posts
msg #38927
Ignore alf44
11/16/2005 4:22:36 PM

I wanted to follow up on this Range Contraction/Expansion Filter !

The original filter I posted had a bit of a "glitch" in the Windup Pattern part of the filter. Also, as I said...I wanted to ADD the Shark Pattern to the mix of patterns to screen for.

Well, the Windup Pattern glitch has been fixed...and, the Shark has been added !

This NEW filter screens for (count'em)...8... that's E-I-G-H-T different congestion/expansion patterns ! lol

Very cool ! imo


The NEW IMPROVED Range Contraction/Expansion Filter :

--------------------

Fetcher[/* Range Contraction/Expansion Filter II */

/* IDs (Inside Days -> H/L range inside H/L range 1 day ago) */
set{IDhi, count(High below High 1 day ago, 1)}
set{IDlo, count(Low above Low 1 day ago, 1)}
set{ID, IDhi * IDlo}

/* NR4s (Narrowist Range of the last 4 days) */
set{NR4, count(Day Point Range reached a new 4 day Low, 1)}

/* NR7s (Narrowist Range of the last 7 days) */
set{NR7, count(Day Point Range reached a new 7 day Low, 1)}

/* WR4s (Widest Range of the last 4 days) */
set{WR4, count(Day Point Range reached a new 4 day High, 1)}

/* WR7s (Widest Range of the last 7 days) */
set{WR7, count(Day Point Range reached a new 7 day High, 1)}

/* ODs (Outside Days -> H/L range outside H/L range 1 day ago) */
set{ODhi, count(High above High 1 day ago, 1)}
set{ODlo, count(Low below Low 1 day ago, 1)}
set{OD, ODhi * ODlo}

/* Windups (Outside Day followed by an Inside Day) */
set{WUp_ODhi, count(High 1 day ago above High 2 days ago, 1)}
set{WUp_ODlo, count(Low 1 day ago below Low 2 days ago, 1)}
set{WUp_ODhilo, WUp_ODhi * WUp_ODlo}

set{WUp_IDhi, count(High below High 1 day ago, 1)}
set{WUp_IDlo, count(Low above Low 1 day ago, 1)}
set{WUp_IDhilo, WUp_IDhi * WUp_IDlo}

set{WUp, WUp_ODhilo * WUp_IDhilo}

/* Shark Pattern (3 Consecutive Inside Days) */
set{IDhi_3, count(High 2 days ago is below High 3 days ago, 1)}
set{IDlo_3, count(Low 2 days ago is above Low 3 days ago, 1)}
set{IDhilo_3, IDhi_3 * IDlo_3}

set{IDhi_2, count(High 1 day ago is below High 2 days ago, 1)}
set{IDlo_2, count(Low 1 day ago is above Low 2 days ago, 1)}
set{IDhilo_2, IDhi_2 * IDlo_2}

set{IDhi_1, count(High is below High 1 day ago, 1)}
set{IDlo_1, count(Low is above Low 1 day ago, 1)}
set{IDhilo_1, IDhi_1 * IDlo_1}

set{ID32, IDhilo_3 * IDhilo_2}
set{ID21, ID32 * IDhilo_1}

/* PatternFetcher */
set{I_Day, ID * 1}
set{NR_4, NR4 * 1}
set{NR_7, NR7 * 1}
set{WR_4, WR4 * 1}
set{WR_7, WR7 * 1}
set{O_Day, OD * 1}
set{W_Up, WUp * 1}
set{Shrk_321, ID21 * 1}

set{A1, I_Day + NR_4}
set{A2, A1 + NR_7}
set{A3, A2 + WR_4}
set{A4, A3 + WR_7}
set{A5, A4 + O_Day}
set{A6, A5 + W_Up}
set{A7, A6 + Shrk_321}

/* Defining "my ROC(2)" Indicator */
set{myROC, ROC(2)}

Show all stocks where A7 is above 0 and
Market is NASDAQ 100

/* Columns (Patterns) */
add column Shrk_321 {Shark}
add column ID
add column NR4
add column NR7
add column WR4
add column WR7
add column OD
add column WUp

/* Indicators */
draw EMA(10)
draw EMA(30)
draw EMA(150)
draw myROC
draw MACD(3,10,16)
draw Slow Stochastic(7,16) Fast %K
draw Slow Stochastic(7,16) Slow %D
draw Slow Stochastic(7,16) Fast %K line at 80
draw Slow Stochastic(7,16) Fast %K line at 20
draw RSI(14)
draw CMA(RSI(14),16)
draw RSI(14) line at 60
draw RSI(14) line at 50
draw RSI(14) line at 40
draw ADX(14)

do not draw A7

chart-time is 3 Months
]



---------------------

I've added the various Indicators I like to watch. Also, the filter as it is posted here is only looking at the NASDAQ 100. You can apply it to whatever Universe of stocks you choose, or to any Watch List you choose. fwiw

Also, I have my own version of this thing with a "battery" of Momentum and Trend information columns. In fact, I'm afraid I may have reached the limit on "added columns" that SF will allow. That would be 20...but, I'm waiting for a reply to that question from the SF guys over on the Comments Forum !

Oh well, I'll continue to work and try to improve it.


Regards,

alf44





freely203
19 posts
msg #38947
Ignore freely203
11/17/2005 4:33:06 AM

Great Job!

I Believe I will benefit alot from this!!

Thx very much!


alf44
2,025 posts
msg #38959
Ignore alf44
11/17/2005 7:47:58 PM

freely203,

Thanks !

I appreciate the comments !


Regards,

alf44




alf44
2,025 posts
msg #39403
Ignore alf44
12/6/2005 12:20:27 AM

I wanted to (again) follow up on this Range Contraction/Expansion Filter !

As I make further refinements I will continue to update this thread !

I have decided to ADD a doji screen to the other 8 Price Patterns already screened for with this filter ! While a "doji" is not generally considered to be a Contraction/Expansion pattern...very often dojis ARE IDs...ODs...NR4s...NR7s...WR4s or WR7s !

When dojis come at oscillator extremes they can be very powerful Reversal Signals ! When dojis occur at those oscillator extremes they are typically referred to as...well, Dojis (of course)...Stars...Hammers...Inverted Hammers etc...

FYI --> I have defined dojis in the criteria as having a High/Low Range greater than 20 cents ... and a Candle Body (ie. Absolute Value of the Close/Open Range) of 10 cents or below (ie. between -.10 and .10) ! By keeping the criteria definition somewhat broad and inclusive...Stars, Dojis, Hammers etc...will ALL have a greater chance of popping up in the screen. Having said that...I still may play around a bit with the "Body" portion of the scan criteria.

This NEWEST filter (now that dojis have been included) screens for (count'em)...9...that's N-I-N-E different Congestion/Expansion patterns ! lol

They Are:

1) Shark Patterns
2) Inside Days
3) NR4s
4) NR7s
5) dojis <---
6) WR4s
7) WR7s
8) Outside Days
9) Wind Ups

Extremely KEWL !!! imo


The "NEWEST" IMPROVED Range Contraction/Expansion Filter :

---------------------------

Fetcher[/* Range Contraction/Expansion Filter III */

/* IDs (Inside Days -> H/L range inside H/L range 1 day ago) */
set{IDhi, count(High below High 1 day ago, 1)}
set{IDlo, count(Low above Low 1 day ago, 1)}
set{ID, IDhi * IDlo}

/* NR4s (Narrowist Range of the last 4 days) */
set{NR4, count(Day Point Range reached a new 4 day Low, 1)}

/* NR7s (Narrowist Range of the last 7 days) */
set{NR7, count(Day Point Range reached a new 7 day Low, 1)}

/* WR4s (Widest Range of the last 4 days) */
set{WR4, count(Day Point Range reached a new 4 day High, 1)}

/* WR7s (Widest Range of the last 7 days) */
set{WR7, count(Day Point Range reached a new 7 day High, 1)}

/* ODs (Outside Days -> H/L range outside H/L range 1 day ago) */
set{ODhi, count(High above High 1 day ago, 1)}
set{ODlo, count(Low below Low 1 day ago, 1)}
set{OD, ODhi * ODlo}

/* Windups (Outside Day followed by an Inside Day) */
set{WUp_ODhi, count(High 1 day ago above High 2 days ago, 1)}
set{WUp_ODlo, count(Low 1 day ago below Low 2 days ago, 1)}
set{WUp_ODhilo, WUp_ODhi * WUp_ODlo}

set{WUp_IDhi, count(High below High 1 day ago, 1)}
set{WUp_IDlo, count(Low above Low 1 day ago, 1)}
set{WUp_IDhilo, WUp_IDhi * WUp_IDlo}

set{WUp, WUp_ODhilo * WUp_IDhilo}

/* Shark Pattern (3 Consecutive Inside Days) */
set{IDhi_3, count(High 2 days ago is below High 3 days ago, 1)}
set{IDlo_3, count(Low 2 days ago is above Low 3 days ago, 1)}
set{IDhilo_3, IDhi_3 * IDlo_3}

set{IDhi_2, count(High 1 day ago is below High 2 days ago, 1)}
set{IDlo_2, count(Low 1 day ago is above Low 2 days ago, 1)}
set{IDhilo_2, IDhi_2 * IDlo_2}

set{IDhi_1, count(High is below High 1 day ago, 1)}
set{IDlo_1, count(Low is above Low 1 day ago, 1)}
set{IDhilo_1, IDhi_1 * IDlo_1}

set{ID32, IDhilo_3 * IDhilo_2}
set{ID21, ID32 * IDhilo_1}

/* Doji (High/Low Range above .20 with Candle Body less than .11) */
set{HiLoRng, count(High minus Low is above 0.20, 1)}
set{ClOpRng, count(Close minus Open is between -0.10 and 0.10, 1)}
set{doji, HiLoRng * ClOpRng}

/* PatternFetcher */
set{I_Day, ID * 1}
set{NR_4, NR4 * 1}
set{NR_7, NR7 * 1}
set{WR_4, WR4 * 1}
set{WR_7, WR7 * 1}
set{O_Day, OD * 1}
set{W_Up, WUp * 1}
set{Shrk_321, ID21 * 1}
set{Do_Ji, doji * 1}

set{A1, I_Day + NR_4}
set{A2, A1 + NR_7}
set{A3, A2 + WR_4}
set{A4, A3 + WR_7}
set{A5, A4 + O_Day}
set{A6, A5 + W_Up}
set{A7, A6 + Shrk_321}
set{A8, A7 + Do_Ji}

/* Defining "my ROC(2)" Indicator */
set{myROC, ROC(2)}

Show all stocks where A8 is above 0 and
Market is NASDAQ 100

/* Columns (Patterns) */
add column Shrk_321 {Shark}
add column ID
add column NR4
add column NR7
add column doji
add column WR4
add column WR7
add column OD
add column WUp

/* Indicators */
draw EMA(10)
draw EMA(30)
draw EMA(150)
draw myROC
draw MACD(3,10,16)
draw Slow Stochastic(7,10) Fast %K
draw Slow Stochastic(7,10) Slow %D
draw Slow Stochastic(7,10) Fast %K line at 80
draw Slow Stochastic(7,10) Fast %K line at 20
draw RSI(14)
draw CMA(RSI(14),16)
draw RSI(14) line at 60
draw RSI(14) line at 50
draw RSI(14) line at 40
draw ADX(14)

do not draw A8

chart-time is 3 Months
]



-----------------------

As I said previously, I've added the various Indicators I like to watch. Also, the filter as it is posted here is only looking at the NASDAQ 100. You can apply it to whatever Universe of stocks you choose, or to any Watch List you choose. fwiw

Also, I have my own version of this thing with a "battery" of Momentum and Trend information columns.

I think this addition of the doji pattern is a nice compliment to the other patterns that are already there.

I'll "continue to continue" to work and try to improve it. lol


Regards,

alf44




StockFetcher Forums · Filter Exchange · Range Contraction/Expansion Filter<< 1 2 3 4 5 ... 12 >>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 2022 - 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


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.