Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

PCF question Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
dazzy
Posted : Friday, February 2, 2018 6:11:32 PM
Registered User
Joined: 1/17/2018
Posts: 7

Hello Bruce,

Please help me with a formula/scan.   If I have a  20 period Hull moving average of a standard Coppock curve, and I want to scan for stocks that have made the largest 1 day percentage move away from that Hull moving average (either up or down)  how would  I code that?  What about a 5 day move too?

Many thanks,

Dave S.

Bruce_L
Posted : Saturday, February 3, 2018 9:16:49 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138

A formula for the standard 11,14,10 Coppock Curve minus its own 20 period Hull Moving Average can be written as follows.

100 * FAVG(C / C11 + C / C14 - 2, 10) - HAVG(100 * FAVG(C / C11 + C / C14 - 2, 10), 20)

The absolute value of difference (the distance) can be written as follows.

ABS(100 * FAVG(C / C11 + C / C14 - 2, 10) - HAVG(100 * FAVG(C / C11 + C / C14 - 2, 10), 20))

So the change in this distance from one bar to the next can be written as follows.

ABS(100 * FAVG(C / C11 + C / C14 - 2, 10) - HAVG(100 * FAVG(C / C11 + C / C14 - 2, 10), 20)) - ABS(100 * FAVG(C1 / C12 + C1 / C15 - 2, 10) - HAVG(100 * FAVG(C1 / C12 + C1 / C15 - 2, 10), 20))

Expressing this as a percent change in the distance can be written as follows (altohugh I don't think this is desirable).

100 * (ABS(100 * FAVG(C / C11 + C / C14 - 2, 10) - HAVG(100 * FAVG(C / C11 + C / C14 - 2, 10), 20)) / ABS(100 * FAVG(C1 / C12 + C1 / C15 - 2, 10) - HAVG(100 * FAVG(C1 / C12 + C1 / C15 - 2, 10), 20)) - 1)

And the change in this distance from five bars ago to the current value can be written as follows.

ABS(100 * FAVG(C / C11 + C / C14 - 2, 10) - HAVG(100 * FAVG(C / C11 + C / C14 - 2, 10), 20)) - ABS(100 * FAVG(C5 / C16 + C5 / C19 - 2, 10) - HAVG(100 * FAVG(C5 / C16 + C5 / C19 - 2, 10), 20))

Expressing this as a percent change in the distance can be written as follows (altohugh I don't think this is desirable).

100 * (ABS(100 * FAVG(C / C11 + C / C14 - 2, 10) - HAVG(100 * FAVG(C / C11 + C / C14 - 2, 10), 20)) / ABS(100 * FAVG(C5 / C16 + C5 / C19 - 2, 10) - HAVG(100 * FAVG(C5 / C16 + C5 / C19 - 2, 10), 20)) - 1)



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Users browsing this topic
Guest-1

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.