Download software Tutorial videos
Subscription & data-feed pricing Class schedule

New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

Requesting a PCF scan for a Price - MACD Histogram Divergence Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Posted : Wednesday, May 30, 2018 11:34:35 PM
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).

  1. MACD Histogram falls to its lowest low of 100 bars, then
  2. MACD Histogram crosses above the zero line, then
  3. Stock price hits new 100 day low; and then,
  4. MACD Histogram crosses below its zero line again.

Thank you in advance for any help you can provide.

Posted : Wednesday, June 06, 2018 8:45:18 PM
Registered User
Joined: 10/7/2004
Posts: 5

Yes, Im looking for something like that divergence scan too. Perhaps Bruce can help us.

Posted : Thursday, June 07, 2018 8:26:57 AM

Gold Customer Gold Customer

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. 


Posted : Thursday, June 07, 2018 8:41:19 AM

Gold Customer Gold Customer

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 ...

Posted : Thursday, June 07, 2018 11:09:41 AM

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.

Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic

Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.