This is the complete adaptive Polyfit MA coded by Mladen for MT4. Apologies if this one is a repost but I had no luck finding this on our site yet.
As explained by Mladen:
Here is a "complete" alb version of PolyFit ma.
Now it is adaptive regardless of the mode used for calculation : FitMode 0 and 1. Added one option : Adaptive. If it is set to true, then the indicator switches to adaptive mode, else it works as regular PlyFir moving average - without adaptive lengths for calculation. That way it is easy to have all the possible calculations from this single indicator