## New version 17 available now

Subscription & data-feed pricing Class schedule

Margin rates Stock & option commissions

 Crossing Up or Down with Groups of EMAs Rate this Topic:
 Previous Topic · Next Topic Watch this topic · Print this topic ·
 Posted : Tuesday, March 14, 2017 9:53:35 AM
Platinum Customer

Joined: 10/7/2004
Posts: 975

Bruce, with the new v17 capabilities, can you create Crossovers with groups of shorter and longer EMAs?  Below I am using Fibonacci number sequences with Daryl Guppy's indicator.

1) Shorter EMAs (XAvgC2, XAvgC3, XAvgC5, XAvgC8, XAvgC13) Crossing Up Longer EMAs (XAvgC34, XAvgC55, XAvgC89, XAvgC144, XAvgC233)

2) Shorter EMAs (XAvgC2, XAvgC3, XAvgC5, XAvgC8, XAvgC13) Crossing Down Longer EMAs (XAvgC34, XAvgC55, XAvgC89, XAvgC144, XAvgC233)

Bruce_L
 Posted : Tuesday, March 14, 2017 10:03:35 AM

Worden Trainer

Joined: 10/7/2004
Posts: 61,012

Please try the following for the crossup.

XUP(LEAST(XAVGC2, XAVGC3, XAVGC5, XAVGC8, XAVGC13), GREATEST(XAVGC34, XAVGC55, XAVGC89, XAVGC144, XAVGC233))

And the following for the crossdown.

XDOWN(GREATEST(XAVGC2, XAVGC3, XAVGC5, XAVGC8, XAVGC13), LEAST(XAVGC34, XAVGC55, XAVGC89, XAVGC144, XAVGC233))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
 Posted : Tuesday, March 14, 2017 10:12:38 AM
Platinum Customer

Joined: 10/7/2004
Posts: 975

It's amazing how easy these formulas are now contrasted to using just Boolean Logic dating back to the 1800s.

I am wondering if these capabilities are proprietary programming language created by Worden employees?

Or does this new language have a name?

Bruce_L
 Posted : Tuesday, March 14, 2017 10:15:06 AM

Worden Trainer

Joined: 10/7/2004
Posts: 61,012

The language name is still the Personal Criteria Formula Language and it is developed internally. The new stuff is new to the language, but not new concepts.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
 Posted : Tuesday, March 14, 2017 11:02:03 AM
Platinum Customer

Joined: 10/7/2004
Posts: 975

Thanks for the explanation.  Now as to one of the new Conditions, now tested.

I found the new "Fib Guppy Shorter EMAs XUp Longer EMAs" t didn't trigger as I would have expected.

Fib Guppy Shorter EMAs XUp Longer EMAs

XUP(LEAST(XAVGC2, XAVGC3, XAVGC5, XAVGC8, XAVGC13), GREATEST(XAVGC34, XAVGC55, XAVGC89, XAVGC144, XAVGC233))

Let me explain...

I created an Easy Scan for US Common Stocks with these two criteria:

1) Fib Guppy Shorter EMAs XUp Longer EMAs 170314

2) XAvgV252.1>250000

Today, mostly a down day, there are just two Long results: BGI and SLM.

I would have expected the all shorter Fib EMAs to be below all the longer Fib EMAs before crossing up.

Thus, on SLM, the XUp should have triggered on November 9, 2016 rather than today.

And, on BGI, the XUp should have triggered on January 24, 2016.

Bruce_L
 Posted : Tuesday, March 14, 2017 4:07:07 PM

Worden Trainer

Joined: 10/7/2004
Posts: 61,012

SLM hasn't actually had all of the shorter moving averages below all of the longer moving averages since the shorter moving averages all crossed above on August 16, 2016, so the the November 9, 2016 crossup wouldn't count either if that is the way you want to do the calcualtions.

Unfortunately, while I have found a relative short way to write this (by comparing the bars since all the moving averages were above vs below using TrueInRow or SinceTrue), the resulting formula is too slow to be practical or post.

The way I wrote it above is the best I have been able to do so far.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
 Posted : Tuesday, March 14, 2017 6:18:37 PM
Platinum Customer

Joined: 10/7/2004
Posts: 975

Thanks, Bruce.

bcochrane
 Posted : Monday, March 20, 2017 3:22:16 PM
Gold Customer

Joined: 9/17/2010
Posts: 333

Bruce, posting the following for your thoughts:

I have a similar signal, with three preconditions and two elements in the trigger

Preconditions

1. RSI 21 > 50 and
2. XAVGC21>XAVGC80 and
3. XAVGC13>XAVGC80

Trigger elements
1. XAVGC5 cross above XAVGC13 and
2. XAVGC5 cross above XAVGC21

Not being sure that there would always be a consistent order that the crosses would follow, and wanting more than one day to become aware of the signal, I coded the trigger elements as follows:

(XAVGC5>XAVGC13 and XAVGC5>XAVGC21) and
NOT(XAVGC5.2>XAVGC13.2 and XAVGC5.2>XAVGC21.2)

This technique could be extended to the GuppyCharts, with the many more MA's in the PCF.
Would this technique be inefficient and slow, or comparable to your solution?
Thanks

Bruce_L
 Posted : Monday, March 20, 2017 4:05:52 PM

Worden Trainer

Joined: 10/7/2004
Posts: 61,012

It is significantly more resource intensive to test for the shorter MAs as a whole being above the longer MAs as a whole then to test for a single moving average being above a group of moving averages or for a list of moving averages to be in a given order.

In addition, you donat seem to be checking for the first time the 5 is above both the 13 and th 21 since the last time the 5 was below both the 13 and 21. You are just trying to check that it is above both now but not above both 2 bars ago.

I could test for the first time traderlady's moving averages went from shortest to longest since the moving averages were last arranged longest to shortest going out to 22 bars without the formula become too slow to post (not that 22 bars is enough really for this particular formula, at 22 bars I just have it stop checking how long it has been by using a >= sign instead of a > sign).

XAVGC2 > XAVGC3 AND XAVGC3 > XAVGC5 AND XAVGC5 > XAVGC8 AND XAVGC8 > XAVGC13 AND XAVGC13 > XAVGC34 AND XAVGC34 > XAVGC55 AND XAVGC55 > XAVGC89 AND XAVGC89 > XAVGC144 AND XAVGC144 AND NOT(XAVGC2.1 > XAVGC3.1 AND XAVGC3.1 > XAVGC5.1 AND XAVGC5.1 > XAVGC8.1 AND XAVGC8.1 > XAVGC13.1 AND XAVGC13.1 > XAVGC34.1 AND XAVGC34.1 > XAVGC55.1 AND XAVGC55.1 > XAVGC89.1 AND XAVGC89.1 > XAVGC144.1 AND XAVGC144.1) AND TrueInRow(NOT(XAVGC2.1 > XAVGC3.1 AND XAVGC3.1 > XAVGC5.1 AND XAVGC5.1 > XAVGC8.1 AND XAVGC8.1 > XAVGC13.1 AND XAVGC13.1 > XAVGC34.1 AND XAVGC34.1 > XAVGC55.1 AND XAVGC55.1 > XAVGC89.1 AND XAVGC89.1 > XAVGC144.1 AND XAVGC144.1), 22) >= TrueinRow(NOT(XAVGC2.1 < XAVGC3.1 AND XAVGC3.1 < XAVGC5.1 AND XAVGC5.1 < XAVGC8.1 AND XAVGC8.1 < XAVGC13.1 AND XAVGC13.1 < XAVGC34.1 AND XAVGC34.1 < XAVGC55.1 AND XAVGC55.1 < XAVGC89.1 AND XAVGC89.1 < XAVGC144.1 AND XAVGC144.1), 22)

But I can't even do the same for a single bar when checking for the first time the group of short moving averages is above the group of long moving averages since the last time the group of short moving averages was below the entire group of long moving averages.

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

 Forum Jump Customer Training & Support - Ask a Trainer - TC2000 version 12/17 - 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 17 - 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.