Attachments forums

List of attachments posted on this forum.


All files on forums: 135250

Adaptive Lookback Nonlag MA

Jimmy, Wed Oct 09, 2019 9:53 pm

Here is the ALB (Adaptive Lookback) Nonlag MA that was tweaked by Mladen several years ago.

As explained by Mladen:
I added the adaptive lookback period calculation to igorads version (so did not change the rest of the code) Tried to make it not so processor hungry (there is a rather good part of code executed whenever the period changes) and as far as I see it works OK. Also, due to the nature of NonLagMA minimum period is (internally) limited to 3, otherwise a zero divide error is generated and NonLagMA calculation is not possible.

Compare it - I am not sure that the result is what you expected (here is an example of an 1 hour chart where at a certain period there was a strong trend - since the alb will adapt and the values tend to be long in trends - here is a comparison of alb NonLagMA with (orange) 25 period NonLagMa (blue - since the period for 5 swing alb varies from 6 to 33 (at the bottom it is visible) I compared these lengths instead of default 9 that NonLagMa uses))


If there is no such a long trend then the speed of the alb version is as fast or faster in some cases as the original 9 period (so actually very fast) NonLagMA. So if you wanted the one that will slow down in trends, you got it if in other hand you expected it to be faster all the time - it will be sometimes, but not all the time. It depends on price changes and trends


Thanks to Mladen for these codes :)
All files in topic