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

20d EMA Formula Replicatable in Excel Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
jfh123
Posted : Wednesday, August 6, 2008 1:44:51 PM
Registered User
Joined: 12/17/2004
Posts: 143
BruceL(?),

I think this is a question for Bruce, as I saw where he wrote 10d & 60d PCFs w/o using the xavg function, but can't I find them anymore.  Would you write me a 20d EMA formula that I can also put in excel?  I don't need the code to be identical, but I do want the answers to be identical (or at least close enough that I can make them invisible with rounding) in Excel and Telechart.  Thanks!

J
Bruce_L
Posted : Thursday, August 7, 2008 11:45:16 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
I can write a 20-Period Exponential Moving Average formula that doesn't use XAVGC20 or the XAVG() function:

.0953245136006837 * (C + 19 / 21 * (C1 + 19 / 21 * (C2 + 19 / 21 * (C3 + 19 / 21 * (C4 + 19 / 21 * (C5 + 19 / 21 * (C6 + 19 / 21 * (C7 + 19 / 21 * (C8 + 19 / 21 * (C9 + 19 / 21 * (C10 + 19 / 21 * (C11 + 19 / 21 * (C12 + 19 / 21 * (C13 + 19 / 21 * (C14 + 19 / 21 * (C15 + 19 / 21 * (C16 + 19 / 21 * (C17 + 19 / 21 * (C18 + 19 / 21 * (C19 + 19 / 21 * (C20 + 19 / 21 * (C21 + 19 / 21 * (C22 + 19 / 21 * (C23 + 19 / 21 * (C24 + 19 / 21 * (C25 + 19 / 21 * (C26 + 19 / 21 * (C27 + 19 / 21 * (C28 + 19 / 21 * (C29 + 19 / 21 * (C30 + 19 / 21 * (C31 + 19 / 21 * (C32 + 19 / 21 * (C33 + 19 / 21 * (C34 + 19 / 21 * (C35 + 19 / 21 * (C36 + 19 / 21 * (C37 + 19 / 21 * (C38 + 19 / 21 * (C39 + 19 / 21 * (C40 + 19 / 21 * (C41 + 19 / 21 * (C42 + 19 / 21 * (C43 + 19 / 21 * (C44 + 19 / 21 * (C45 + 19 / 21 * (C46 + 19 / 21 * (C47 + 19 / 21 * (C48 + 19 / 21 * (C49 + 19 / 21 * (C50 + 19 / 21 * (C51 + 19 / 21 * (C52 + 19 / 21 * (C53 + 19 / 21 * (C54 + 19 / 21 * (C55 + 19 / 21 * (C56 + 19 / 21 * (C57 + 19 / 21 * (C58 + 19 / 21 * (C59 + 19 / 21 * (C60 + 19 / 21 * (C61 + 19 / 21 * (C62 + 19 / 21 * (C63 + 19 / 21 * (C64 + 19 / 21 * (C65 + 19 / 21 * (C66 + 19 / 21 * (C67 + 19 / 21 * (C68 + 19 / 21 * (C69))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

Duplicating this in Excel is beyond what we do in the forums however. We do not provide training or support for third party software.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jfh123
Posted : Thursday, May 21, 2009 10:12:37 PM
Registered User
Joined: 12/17/2004
Posts: 143
B-

Would you remind me how you get the constant which begins the formula?

J
Bruce_L
Posted : Friday, May 22, 2009 7:39:39 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
It starts with (1 - (Period - 1) / (Period + 1)) = 2 / (Period + 1).

This would probably be a pretty good approximation in and of itself, but I generally adjust it for unity (to make the sum of the factors being used add up to one) by dividing (2 / (Period + 1)) by the sum of the factors for the number of terms being used.

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
jfh123
Posted : Friday, May 22, 2009 1:31:12 PM
Registered User
Joined: 12/17/2004
Posts: 143
Thanks.
Bruce_L
Posted : Friday, May 22, 2009 1:34:08 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.