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.
I spent some time reading an older scan "Double Top / Double Bottom" (Dec 2014) where markd helped writing the scan but did so only for Double Tops. At the end of his response, markd wrote: "You could just turn everything around to see if you can get double bottoms.".
That's what I have been trying to do for 2 days now but the resulting stocks' patterns do not match what (I thought) they should look like.
Can anyone help? If markd comes across this here, what did you have in mind in choosing the K-31 & 63 for Price Channel? Do these two numbers have to do anything with the 10 and 20 days ago (I do understand that the time period is set for > 4 weeks = 20 trading days and the 10 days are just half of 20).
Much appreciated for any help!
Thx,
George
Here is what I ran for Double Bottoms:
[GROUP IS NOT ETF] AND [CLOSE > 20] AND
[FAST STOCH %K(31, 1) < 20] AND
[10 DAYS AGO MIN(31, FAST STOCH %K(31,1)) < 20] AND
[MAX(31, FAST STOCH %K(31,1)) > 80] AND
[1 DAY AGO LOWER PRICE CHAN(63) = 20 DAYS AGO LOWER PRICE CHAN(63)] AND
[LOWER PRICE CHAN(31) > LOWER PRICE CHAN(63) *1.03]
0
Comments
K tells you where price is in its range over a certain period. Obviously a bottom is in the lower range. So for a double bottom, the stock should have been in that lower range during some period in its past, and be there again now.
[FAST STOCH %K(31, 1) < 20] AND
[10 DAYS AGO MIN(31, FAST STOCH %K(31,1)) < 20]
You also want the second bottom to be somewhere near the prior bottom in price. (If price moved up significantly, then the lower channel could have moved up, too, so that when price returns to the low of the channel, it is making a higher low, not a double bottom.) One way to test for a possible double bottom is to compare lower price channels for 2 different periods. If the longer period has not moved up or down, and the short time period is somewhere near it, that means price is somewhere near where it was before.
[1 DAY AGO LOWER PRICE CHAN(63) = 20 DAYS AGO LOWER PRICE CHAN(63)] AND
[LOWER PRICE CHAN(31) > LOWER PRICE CHAN(63) *1.03]
The third component of a double (top) bottom is a meaningful (down) up leg in between. One way to test for this is a high K level in a time period between the two bottoms.
[MAX(31, FAST STOCH %K(31,1)) > 80]
The choices of look back periods (max and/or min) and channel time frames is discretionary, based on your research. Usually I use calendar based time frames for most things - a quarter (63 bars), a month (21) or a half month (10). I think after playing around with dryan's scan, I hit on 31 (about six weeks) as something that produced reasonable results.
The last line of your version of the scan seems to produce more results that are approaching a possible double bottom. If you comment out that line, you get more results overall and more that are close to exact (possible) double bottoms.
Below is your scan re-formatted slightly. If you put the "and" at the beginning of the line, it is easier to comment out each line to test its effect on the results:
[GROUP IS NOT ETF] AND [CLOSE > 20]
AND [FAST STOCH %K(31, 1) < 20]
AND [10 DAYS AGO MIN(31, FAST STOCH %K(31,1)) < 20]
AND [MAX(31, FAST STOCH %K(31,1)) > 80]
AND [1 DAY AGO LOWER PRICE CHAN(63) = 20 DAYS AGO LOWER PRICE CHAN(63)]
//AND[LOWER PRICE CHAN(31) > LOWER PRICE CHAN(63) *1.03]
Also, you might narrow your universe a little by specifying
[type is stock]
and [ [exchange is NYSE] or [exchange is NASD] ]
That is more likely to get fewer untradable hits. Not the double brackets around the exchange conditions. You can add more exchanges inside those double brackets.
Note my scan for dryan was a "quick and dirty" thing to use as a starting point, not a final and well thought out product. So feel free to alter, add or toss whatever you think would work better.
Re-read your response many times trying to absorb, understand and learn. As new to scanning, I am painstakingly realizing how challenging & DYNAMIC scan-code writing can be.
I've added some clauses (i.e exchanges) and varied some of the parameters and indeed (as you said) was able to get some good hits.
Last, my intent for using the double bottom scan is to look for weekly data (day * 5) instead of daily.
Converting from daily to weekly, would there be any parameter (days vs weeks) that you think would need to be changed?
[TYPE IS STOCK] AND [ [EXCHANGE IS NYSE] OR [EXCHANGE IS NASD] ] AND .....
AND [WEEKLY FAST STOCH %K(31, 1) < 20]
AND [10 WEEKS AGO MIN(31, WEEKLY FAST STOCH %K(31,1)) < 20]
AND [MAX(31, WEEKLY FAST STOCH %K(31,1)) > 80]
AND [1 WEEK AGO WEEKLY LOWER PRICE CHAN(63) = 20 WEEKS AGO WEEKLY LOWER PRICE CHAN(63)]
Regards,
George