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

26-week EMA computation Rate this Topic:
Previous Topic · Next Topic Watch this topic · Print this topic ·
tedstarr2
Posted : Friday, September 1, 2006 9:09:28 AM
Registered User
Joined: 7/12/2005
Posts: 6
As part of my weekly Index and Sector analysis, I look at the weekly chart and compare the weekly close with the 26-week EMA on the weekly chart. I created a PCF that I thought would give me the weekly EMA value, then I have a PCF that takes the current price and compare that to the computed weekly EMA. PRoblem is that the computation I have, which I pulled from some documentation on the web, doesn't give the same value as one sees in the 26 Week EMA displayed on the weekly chart. Since I'd like to automate the process so that I simply get the results displayed visually, I was wondering if anyone could tell me if there is a problem in my equation or if there is something else going on. Here is what I'm using for the computation of 26-week EMA in the PCF -

0.085654746939 * C + 0.079309950869 * C5 + 0.073435139694 * C10 + 0.067995499716 * C15 + 0.062958796034 * C20 + 0.058295181513 * C25 + 0.053977019919 * C30 + 0.049978722147 * C35 + 0.046276594581 * C40 + 0.042848698686 * C45 + 0.039674721006 * C50 + 0.036735852783 * C55 + 0.034014678503 * C60 + 0.031495072688 * C65 + 0.029162104340 * C70 + 0.027001948463 * C75 + 0.025001804133 * C80 + 0.023149818641 * C85 + 0.021435017261 * C90 + 0.019847238204 * C95 + 0.018377072411 * C100 + 0.017015807788 * C105 + 0.015755377582 * C110 + 0.014588312576 * C115 + 0.013507696829 * C120 + 0.012507126694 * C125

I actually added digits, thinking it was a precision problem in the coefficients, but couldn't test it because the Test function on the PCF only shows up to 2 decimal places. Any ideas greatly appreciated. Thanks!

- Ted
Bruce_L
Posted : Friday, September 1, 2006 9:32:31 AM


Worden Trainer

Joined: 10/7/2004
Posts: 65,138
The general format seems correct, but it is not using enough terms for an accurate calculation. You may wish to try the following instead:

.0741468444601841 * (C + 25 / 27 * (C5 + 25 / 27 * (C10 + 25 / 27 * (C15 + 25 / 27 * (C20 + 25 / 27 * (C25 + 25 / 27 * (C30 + 25 / 27 * (C35 + 25 / 27 * (C40 + 25 / 27 * (C45 + 25 / 27 * (C50 + 25 / 27 * (C55 + 25 / 27 * (C60 + 25 / 27 * (C65 + 25 / 27 * (C70 + 25 / 27 * (C75 + 25 / 27 * (C80 + 25 / 27 * (C85 + 25 / 27 * (C90 + 25 / 27 * (C95 + 25 / 27 * (C100 + 25 / 27 * (C105 + 25 / 27 * (C110 + 25 / 27 * (C115 + 25 / 27 * (C120 + 25 / 27 * (C125 + 25 / 27 * (C130 + 25 / 27 * (C135 + 25 / 27 * (C140 + 25 / 27 * (C145 + 25 / 27 * (C150 + 25 / 27 * (C155 + 25 / 27 * (C160 + 25 / 27 * (C165 + 25 / 27 * (C170 + 25 / 27 * (C175 + 25 / 27 * (C180 + 25 / 27 * (C185 + 25 / 27 * (C190 + 25 / 27 * (C195 + 25 / 27 * (C200 + 25 / 27 * (C205 + 25 / 27 * (C210 + 25 / 27 * (C215 + 25 / 27 * (C220 + 25 / 27 * (C225 + 25 / 27 * (C230 + 25 / 27 * (C235 + 25 / 27 * (C240 + 25 / 27 * (C245 + 25 / 27 * (C250 + 25 / 27 * (C255 + 25 / 27 * (C260 + 25 / 27 * (C265 + 25 / 27 * (C270 + 25 / 27 * (C275 + 25 / 27 * (C280 + 25 / 27 * (C285 + 25 / 27 * (C290 + 25 / 27 * (C295 + 25 / 27 * (C300 + 25 / 27 * (C305 + 25 / 27 * (C310 + 25 / 27 * (C315 + 25 / 27 * (C320 + 25 / 27 * (C325 + 25 / 27 * (C330 + 25 / 27 * (C335 + 25 / 27 * (C340 + 25 / 27 * (C345 + 25 / 27 * (C350 + 25 / 27 * (C355 + 25 / 27 * (C360 + 25 / 27 * (C365 + 25 / 27 * (C370 + 25 / 27 * (C375 + 25 / 27 * (C380 + 25 / 27 * (C385 + 25 / 27 * (C390 + 25 / 27 * (C395 + 25 / 27 * (C400 + 25 / 27 * (C405 + 25 / 27 * (C410 + 25 / 27 * (C415 + 25 / 27 * (C420 + 25 / 27 * (C425 + 25 / 27 * (C430 + 25 / 27 * (C435 + 25 / 27 * (C440 + 25 / 27 * (C445))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))

-Bruce
Personal Criteria Formulas
TC2000 Support Articles
tedstarr2
Posted : Friday, September 1, 2006 9:35:51 AM
Registered User
Joined: 7/12/2005
Posts: 6
I'll give this a try. Thanks!
Bruce_L
Posted : Friday, September 1, 2006 9:53:26 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.