Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.

 MA distance Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
Quiktdr
 Posted : Thursday, November 29, 2012 8:53:20 AM
Registered User
Joined: 10/7/2004
Posts: 794

How do I write a PCF for distance between an exponential moving average and an ema of that ema.

For example   XAVGC3 > AVG(XAVGC3,3)

I am looking to guage when the distance constricts or expands between these two moving averages.

Also AVGC3 > AVG(XAVGC3,3)

Bruce_L
 Posted : Thursday, November 29, 2012 9:01:25 AM

Worden Trainer

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

The difference between XAVGC3 and AVG(XAVGC3,3) could be written as:

XAVGC3 - AVG(XAVGC3,3)

The absolute difference between XAVGC3 and AVG(XAVGC3,3) could be written as:

ABS(XAVGC3 - AVG(XAVGC3,3))

The percent difference (as a percentage of AVG(XAVGC3,3)) between XAVGC3 and AVG(XAVGC3,3) could be written as:

100 * (XAVGC3 / AVG(XAVGC3, 3) - 1)

The absolute percent difference between XAVGC3 and AVG(XAVGC3,3) could be written as:

100 * ABS(XAVGC3 / AVG(XAVGC3, 3) - 1)

Doing the same for the differences between AVGC3 and AVG(XAVGC3, 3) is just a matter of replacing the first XAVGC3 in each formula with AVGC3 instead.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Quiktdr
 Posted : Thursday, November 29, 2012 12:24:39 PM
Registered User
Joined: 10/7/2004
Posts: 794

Thank you!

Quiktdr
 Posted : Tuesday, March 5, 2019 1:45:40 PM
Registered User
Joined: 10/7/2004
Posts: 794

Is there a way to write a pcf for the first time XAVGC3 > AVG(XAVGC3,3)  goes positive and signals with an up-bar?

Bruce_L
 Posted : Tuesday, March 5, 2019 2:04:48 PM

Worden Trainer

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

If an up bar is the close being above the open.

`C > O AND TrueInRow(XAVGC3 > AVG(XAVGC3,3)), 2) = 1`

If an up bar is the close being above the previous close.

`C > C1 AND TrueInRow(XAVGC3 > AVG(XAVGC3,3)), 2) = 1`

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

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/18 - Ask a Trainer - TC2000 version 7 - Ask a Trainer - StockFinder 5.0 - PCFs, EasyScan and Custom Indicators General Discussions - Stock and Market Talk - TC2000 version 12 or 18 - TC2000 version 7 - StockFinder 5.0 - RealCode for StockFinder 5.0 Tutorial Videos - TC2000 version 12 tutorial videos - TC2000 version 7 tutorial videos 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.