Ok, let's forget excel for now. Below is code in Java (for some reason I can't post code on this forum).Quote from jcl:
Luckyputanski: I'm also not using Excel often, so there may be problems that I don't see. For checking if your lowpass filter was correctly implemented, compare your chart with this one.
Ok, we getting somewhere with this thread, but it's painfully slow. I asked in the first post if I calculate LP correctly. Formula from the spreadsheet can be seen in the picture.
Quote from panzerman:
Getting a zero lag moving average is easy:
Step 1: Calculate a MA (any MA) of price
Step 2: Calculate a second MA of the first MA using the same parameters.
Step 3: 2*MA1-MA2 = zero lag MA
However, having a zero lag MA doesn't give you any better performance as an indicator than any other MA. Again, do some proper back testing and prove it for yourself.
Let's keep this thread on track - I'm trying hard to see advantage of JCL's low pass filter over SMA, first.
That's the experience I have so far. But JCL swears by his low pass filter, so I'm trying to see if it's me doing something wrong, or is it... well, not sure what. I'm just keeping open mind, letting others to prove me wrong.Quote from panzerman:
And I'm trying to tell you that there really isn't any advantage. You can make any MA zero lag if you wish by using the above technique, but one zero lag MA is probably not better than any other zero lag MA.
Quote from jcl:
Luckyputanski: I do not necessarily swear by the Lowpass filter, which is by the way not my idea, but goes back to Ehlers. I'm saying that due to its low lag it's a tool that is useful for almost all systems.
panzerman: I believe you that you see no improvement with your zero lag MA - I don't know where you got that recipe from, but it has obviously exactly the same lag as a normal SMA.
I'm not sure that the Java code is correct, at least it calculates the function in a different way with a loop. The correct way would be to shift the series arrays first by 1, then calculate only the [0] term. Can't you just download Zorro or any other platform such as Ninja Trader that directly supports series? This would spare a long discussion or long workarounds in code - you can then just directly enter the code and test Lowpass vs. SMA in one minute.Quote from luckyputanski:
JCL, you stated many times in other threads that this low pass filter is better than SMA. I'm using SMA at the moment, but I would love to see something better. So far, low pass filter is not any better than SMA, so I'm asking you to prove me wrong.
Is my java code correct?