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.
Need scanner for fractals/ Pivot lows . It is 5-bar pattern where the middle bar is the lowest compared to 2-bars left to it and 2-bars to the Right of the middle bar. Here is the souce code for it
https://motivewave.com/studies/fractal.htm
0
Comments
//high fractal
and [2 days ago high = max(5,high)]
// low fractal
and [2 days ago low = min(5, low)]
I haven't tested it.
Note: The charts from the source page are a little deceptive. You can't enter where the arrows are located because the fractal occurrence cannot be confirmed until after the close of the fifth day, or two days after the fractal high or low actually occurs. So, you cannot actually enter until the open of the third day. Often, the trade is more than half over by that time, unless you catch a longer trend, which you probably cannot know ahead of time. If your exit rule is to exit on an opposite fractal, you could easily have multiple losing trades in a more range-y market (trade exit is below trade open if long, or above trade open if short).
here's a links on this forum where some "favorite" scans were shared
https://scan.stockcharts.com/discussion/2775/sharing-a-simple-favorite-scan-for-bull-markets
https://scan.stockcharts.com/discussion/2220/favorite-scan
type favorite in the search box at the upper right of the forum to see other "favorites"
here's a simple line to find securities in your universe that are within 8% of 2 weeks ago upper 20 week price channel.
[close > 10 days ago Upper Price Chan(100) * 0.92 ]
This is one version for trending stocks - capturing the end of a down leg in an up trend as price enters the lower 20% of the recent range, when the stock may be ready to reverse.
[group is sp500] // stocks in an index (doesn't have to be this one) tend to trade more smoothly
// stock is trading around the top 80% of its annual (250 day) range, so probably in an up trend
and [max(20,Fast Stoch %K(251,1)) > 80.0]
and [min(20,Fast Stoch %K(251,1)) > 75.0] // you need both the min and the max
// price dips into the bottom 20% of its 20 day range
and [20 x Fast Stoch %K(20,1)]
rank by SCTR
Run this for October 7 to see both the good and the not so good results. Generally the higher ranked SCTRs will do better, although that's not a rule. (note: I believe the SCTRS are as of today, NOT the run date, although unless the stock breaks down or shoots up, SCTRs move slowly. But keep in mind when you do your research that the SCTRs for more distant dates won't be accurate. Run this scan for 15 or 20 widely scattered dates over say the past year to get an idea of the results and a feel for what makes a good trade.
Sometimes the dip into the lower 20% of the recent range is the beginning of a breakdown, so you have to watch for that.
Sometimes there is a pause of a few bars after the hit before price rises. You could wait for a close above the MA 3 of the HIGHS (not the close, so on the chart workbench adding the MA enter 3,high, not just 3).
Unfortunately, not every stock breaks out and you are stuck with a range trade instead. But as long as the trend is strong and the chart looks fairly "regular", you should net positive.
Once you are in and the trade seems to be working, if you are conservative you could trail a stop under the MA 3 of LOWs. Sometimes this is too close, but other times you'll be glad you did.
Here's a high SCTR example. Blue circles are the 10/7 hit. Grey circles are an earlier hit. Notice that within a high quality, orderly traded stock like this one, the hits don't occur very often. Notice both hits are also double bottoms. That probably helps.
Also, quality stocks like this are fairly rare. Note also its in the Real Estate sector which nobody is paying attention to these days, so you never know where good trades may turn up.