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

Counting moving average cross overs Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Afam
Posted : Sunday, June 17, 2018 10:13:35 AM
Registered User
Joined: 6/28/2013
Posts: 8

Hi

Does anyone know if you can do analysis of the number and duration of moving average crossovers using TC2000?

Types of thing I want to do include

  1. Design a test to indicate when the X moving average cuts ABOVE the Y moving average (e.g. The 10 Day Moving average cuts from under to over the 50 Day moving average)
  2. Count the number of times it crosses above
  3. Calculate the shortest period during which the X moving average stays above the Y moving average
  4. Calculate the average period that the X moving average remains above the Y moving average
  5. Calculate the mode
  6. Display the range
  7. Etc.

 

Thanks

 

Famiii

Bruce_L
Posted : Tuesday, June 19, 2018 10:40:33 AM


Worden Trainer

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

We aren't going to be able to accomplish everything on this list within TC2000.

QUOTE (Afam)
Design a test to indicate when the X moving average cuts ABOVE the Y moving average (e.g. The 10 Day Moving average cuts from under to over the 50 Day moving average)

XUP(AVGC10, AVGC50)

QUOTE (Afam)
Count the number of times it crosses above

The following counts the number of times the cross has happened in the most recent 100 bars.

CountTrue(XUP(AVGC10, AVGC50), 100)

QUOTE (Afam)
Calculate the shortest period during which the X moving average stays above the Y moving average

The following displays the smallest number of bars above (with a max of 100 bars) in the most recent 100 bars. If there are no qualifying events, it displays 10000 instead.

MIN(IIF(XDOWN(AVGC10, AVGC50), TrueInRow(AVGC10.1 > AVGC50.1, 100), 10000), 100)

QUOTE (Afam)
Calculate the average period that the X moving average remains above the Y moving average

SUM(IIF(XDOWN(AVGC10, AVGC50), TrueInRow(AVGC10.1 > AVGC50.1, 100), 0), 100) / CountTrue(XDOWN(AVGC10, AVGC50), 100)

I don't really know of a practical way to implement the mode request and do not understand the range request.



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