Download software Tutorial videos
Subscription & data-feed pricing Class schedule


New account application Trading resources
Margin rates Stock & option commissions

Attention: Discussion forums are read-only for extended maintenance until further notice.
Welcome Guest, please sign in to participate in a discussion. Search | Active Topics |

slope of 10 periods moving average Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
JackSe
Posted : Thursday, March 31, 2016 2:12:09 PM
Registered User
Joined: 2/17/2014
Posts: 11

Hi,

how can we calculate slope of 10 periods moving average?

Bruce_L
Posted : Thursday, March 31, 2016 2:22:03 PM


Worden Trainer

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

A net slope from the previous bar to the current bar could be written as follows.

AVGC10 - AVGC10.1

While the percent slope from one bar to the next can be written as follows.

100 * (AVGC10 / AVGC10.1 - 1)

You could adjust this to say 10 bars by adjusting the bars ago parameter. So the net slope would be:

AVGC10 - AVGC10.10

And the percent slope would be:

100 * (AVGC10 / AVGC10.1 - 1)

Once you go to looking at multiple bar slopes, you could calculate a linear regression slope as well.

(4.5 * AVGC10 + 3.5 * AVGC10.1 + 2.5 * AVGC10.2 + 1.5 * AVGC10.3 + .5 * AVGC10.4 - .5 * AVGC10.5 - 1.5 * AVGC10.6 - 2.5 * AVGC10.7 - 3.5 * AVGC10.8 - 4.5 * AVGC10.9) / 82.5

And express this a percentage of the moving average (or some other basis)

100 * (4.5 * AVGC10 + 3.5 * AVGC10.1 + 2.5 * AVGC10.2 + 1.5 * AVGC10.3 + .5 * AVGC10.4 - .5 * AVGC10.5 - 1.5 * AVGC10.6 - 2.5 * AVGC10.7 - 3.5 * AVGC10.8 - 4.5 * AVGC10.9) / 82.5 / AVGC10

Using Linear Regression vs Classical Peaks/Valleys for Divergence Analysis



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
JackSe
Posted : Thursday, March 31, 2016 2:48:49 PM
Registered User
Joined: 2/17/2014
Posts: 11

Hi,

i have just copy and paste 

100 * (4.5 * AVGC10 + 3.5 * AVGC10.1 + 2.5 * AVGC10.2 + 1.5 * AVGC10.3 + .5 * AVGC10.4 - .5 * AVGC10.5 - 1.5 * AVGC10.6 - 2.5 * AVGC10.7 - 3.5 * AVGC10.8 - 4.5 * AVGC10.9) / 82.5 / AVGC10

 

into tc2000 and got message 'Error in formula Argument missing near *'.

 

Please advise how to solve this issue.

BR

Bruce_L
Posted : Thursday, March 31, 2016 3:01:19 PM


Worden Trainer

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

My best guess would be that it is the use of a . for the decimal marker if your computer is set to use the , as the decimal marker. Here is a re-write which avoids the use of decimal markers altogether.

100 * (9 * (AVGC10 - AVGC10.9) + 7 * (AVGC10.1 - AVGC10.8) + 5 * (AVGC10.2 - AVGC10.7) + 3 * (AVGC10.3 - AVGC10.6) + AVGC10.4 - AVGC10.5) / 165 / AVGC10



-Bruce
Personal Criteria Formulas
TC2000 Support Articles
JackSe
Posted : Thursday, March 31, 2016 3:17:45 PM
Registered User
Joined: 2/17/2014
Posts: 11

thank you!

Bruce_L
Posted : Thursday, March 31, 2016 3:19:28 PM


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.