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

Calculating future moving average crossovers Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
Al_Gorithm
Posted : Monday, June 18, 2018 6:32:17 PM

Registered User
Joined: 6/30/2017
Posts: 1,227

Happy Tuesday Bruce,

Not sure if it was in these forums, or in TASC magazine, but somewhere I recall reading how to calculate the price where two moving averages will cross.

I know I've got a "MACD-H XOver" PCF from the Elder-Disk I purchased a few years back, and it kind of does the same thing. And a MACD is just a couple of moving averages so I think this should be doable.

Specifically, I wanna paper-trade using a conditional order that'll trigger a buy on its own when the 3 EMA crosses up through the 8 EMA. The exit will be the opposite - a conditional order triggered by the 3 crossing down through the 8.

There's more to it, of course, but that covers the entry and exit triggers.

Doable?

Bruce_L
Posted : Tuesday, June 19, 2018 9:06:49 AM


Worden Trainer

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

You could have read it either place. I don't remember of the TASC version was simple or exponential, but there are quite a few different iterations in the forums.

The basic idea is to create an equation for the two moving averages (or other indicators for that matter) being equal and then solving for C.

XAVGC3 = XAVGC8

(2 * C + 2 * XAVGC3.1) / 4 = (2 * C + 7 * XAVGC8.1) / 9

18 * C + 18 * XAVGC3.1 = 8 * C + 28 * XAVGC8.1

10 * C = 28 * XAVGC8.1 - 18 * XAVGC3.1

C = (28 * XAVGC8.1 - 18 * XAVGC3.1) / 10

C = (14 * XAVGC8.1 - 9 * XAVGC3.1) / 5

So since we have solved for C, the formula for the price at which the two moving averages would be equal today is the following.

(14 * XAVGC8.1 - 9 * XAVGC3.1) / 5

Now you may actually be interested in tomorrow's close. The price at which the two moving averages would be equal tomorrow (assuming price remains unchanged today) just requires subtracting 1 from the offset parameters.

(14 * XAVGC8 - 9 * XAVGC3) / 5

If the result is negative, then the moving averages cannot cross. If the result is "far away" from the current price (greater than ATR for example), then the moving averages are unlikely to cross.



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
Al_Gorithm
Posted : Tuesday, June 19, 2018 9:28:08 AM

Registered User
Joined: 6/30/2017
Posts: 1,227

Nice, thanks Bruce!

The explanation makes sense, and the PCFs will help. I know two people (who don't know each other) who both trade 3x8 crosses with real money. One eyeballs the chart, the other wrote some PCF scans for a client.

I'm sure they don't trade every cross blindly, and I still don't know how they mitigate the inevitable whipsaws, or if they just chalk it up to the cost of doing business. Guess I just gotta test.

Btw, big day tomorrow - Larry Connors' new book drops. Seven strategies, all objective, data-driven, quantifiable, and rules-based. Can't wait. :)

Supposedly, each setup only relies on two common indicators "available on all charting platforms" so hopefully I can automate this in TC2000 mostly on my own without bugging you too much.

Going offline for most of the rest of today - thanks for all the help!

Bruce_L
Posted : Tuesday, June 19, 2018 9:30:58 AM


Worden Trainer

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

You're welcome.



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