Registered User Joined: 3/9/2005 Posts: 1
|
Can you please help me with a PCF scan for Divergence? Specically I would like to have the following conditions in sequence for both weekly and daily charts. (Weekly EMAs are 26 and 13, and Daily EMAs are 22 and 13).
-
MACD Histogram falls to its lowest low of 100 bars, then
-
MACD Histogram crosses above the zero line, then
-
Stock price hits new 100 day low; and then,
-
MACD Histogram crosses below its zero line again.
Thank you in advance for any help you can provide.
|
Registered User Joined: 10/7/2004 Posts: 5
|
Yes, Im looking for something like that divergence scan too. Perhaps Bruce can help us.
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Nice idea. Sounds Elder-ish. Forgot about his Price/MACD-H divergence setup. I could never figure out how to do it in TC2000. The individual criteria are no problem. The issue has always been the sequencing, aka, "and then...".
The MACD-H crossing the centerline is key to Elder's definition of a divergence. He calls it "breaking the back of the Bull (or Bear)".
One way (it ain't pretty - maybe Bruce has a better idea) is to scan for the first criteria and copy those tickers passing the condition to another watchlist, then scan those for the second criteria ... lather, rinse, repeat for the third and fourth conditions.
Elder does claim this divergence trade is his personal favorite. The dude doesn't work for a living (LOL, just kidding) so I'm assuming the setup works. Either that, or he lives off his royalties and SpikeTrade membership fees. (Just kidding, Alex, love your books ;)
Maybe with v18 it's finally do-able.
|
Registered User Joined: 6/30/2017 Posts: 1,227
|
Went back through my Elder bookshelf. Looks like bluedevil got it right. Elder's written about this multiple times, but here is the most concise, rules-based description I could find.
Reverse the logic for bearish divergences ...
|
Worden Trainer
Joined: 10/7/2004 Posts: 65,138
|
I probably can't come up with anything short and fast enough to be practical or post in the forums based on this particular definition of a divergence.
You can do sequences to some extent and the syntax is somewhat simplified in v18 versus earlier versions of TC2000.
Let us say you have a, b, and c which have to happen in order (a first, then b, then c). You can use something like:
SinceTrue(a, 50) > SinceTrue(b, 50) AND SinceTrue(b, 50) > SinceTrue(c, 50)
You might want to change this structure somewhat since SinceTrue() returns -1 when it isn't found to the following.
TrueInRow(NOT(a), 50) > TrueInRow(NOT(b), 50) AND TrueInRow(NOT(b), 50) > TrueInRow(NOT(c), 50)
There are problems with using this for this definition however. You actually want a, b, a, c in order. There isn't a problem with a, b, c, d in order, but duplicting a in the series means the technique won't work. The following can't be true because the number of bars since a can't be both greater than and less than the number of bars since b.
TrueInRow(NOT(a), 50) > TrueInRow(NOT(b), 50) AND TrueInRow(NOT(b), 50) > TrueInRow(NOT(a), 50)
There are potentially other problems as well, but getting around this issue would be the first hurdle.
-Bruce Personal Criteria Formulas TC2000 Support Articles
|