Welcome to NexusFi: the best trading community on the planet, with over 150,000 members Sign Up Now for Free
Genuine reviews from real traders, not fake reviews from stealth vendors
Quality education from leading professional traders
We are a friendly, helpful, and positive community
We do not tolerate rude behavior, trolling, or vendors advertising in posts
We are here to help, just let us know what you need
You'll need to register in order to view the content of the threads and start contributing to our community. It's free for basic access, or support us by becoming an Elite Member -- see if you qualify for a discount below.
-- Big Mike, Site Administrator
(If you already have an account, login at the top of the page)
Identify Descending Rectangles Utilizing ADX & Scan Them
Somewhat surprising to see ThinkOrSwim affords the user the capacity to identify rectangle chart patterns but not descending (or ascending) rectangle chart patterns, especially as descending and ascending triangles are included in that software. I am looking for the capacity to identify and scan a list of stock symbols for descending rectangles. Is this feasible? Can I pay an adroit user here to create this function in ThinkOrSwim using the parameters as follows:
Falling rectangle defined: formed when prices trace lower highs and lower lows but remain confined within a narrow range. In the case of rising rectangles, prices form higher highs and higher lows while remaining within a narrow range.
During the formation of a falling rectangle, prices should remain closely within a narrow range defined by 5% standard deviation above or below the 20-period simple moving average --as measured with Moving Average Envelope parameters (20,5), resulting in two curves outlining the upper and lower boundaries. Prices are required to fall within these boundaries most of the time for a falling rectangle pattern to be established.
The stock should be non-trending in technical terms during the formation of the falling rectangle. Although the establishment of lower highs and lower lows indicates a visual down trend, the stock should have an Average Directional Movement of below 20 (ADX<20) during the formation of the rectangle.
The duration of time of the falling rectangle should be at least 15 trading days. The longer the time a stock stays in a falling rectangle formation, the more explosive and profitable the move is likely to be.
I'm looking for falling rectangles where prices do not stray more than 5% from the moving average 70% of the time or more.
Is this feasible? Thank you for any insights.
Can you help answer these questions from other members on NexusFi?
I tried to implement your request, but I don't think it does what you were looking for. The MA envelope ends up including a lot of the price moves, and it depends highly on the price and range. ADX also doesn't seem to be great at identifying non-trends. Instead of explicit lower lows and lower highs, I used the IsDescending function, which is a regression slope, which should be more forgiving than explicitly checking each low/high. Anyway, try this code and see if it helps.
Thank you JayC. Does this sort of thing interest you? If so, I will try to work on using a different indicator than ADX and will post here if I find something useful.
Mainly I enjoy solving these requests as puzzles, regardless of their value to me for trading.
While I think scanning for consolidation areas would be useful, not sure if there’s any edge there alone. However, breakout setups have been on my research list lately.
The ttm squeeze indicator has been used in the past, and there’s plenty of articles on that. Coming up with something custom might be nice, but I think breakouts are tough to execute well, and that’s where I assume the edge is.
If you have other ideas you want to try, let me know.