Manually calculated EMA isn't the same as in WL
Author: Panache
Creation Date: 11/1/2019 12:40 AM
profile picture

Panache

#1
NEVER MIND. A FRIEND ANSWERED MY QUESTION FOR ME.

To make a long story short, I wrote a script to manually calculate the EMA:
CODE:
Please log in to see this code.

If I understand the WIKI correctly, this should be exactly the way EMA.Series is calculated. However, when I run this on the symbol REZI for all data, I get a substantial (1.6%) difference between my EMA and the Wealth-Lab value.

Please tell me what is wrong with the way I am calculating my EMA. WEALTH-LAB CALCULATES THE EMA AS FOLLOWS, IE. BY WEIGHTING THE FIRST BAR AT 1 INSTEAD OF K:
CODE:
Please log in to see this code.
profile picture

Eugene

#2
QUOTE:
NEVER MIND. A FRIEND ANSWERED MY QUESTION FOR ME.


Isn't it nice to have good friends!
This website uses cookies to improve your experience. We'll assume you're ok with that, but you can opt-out if you wish (Read more).