Adaptive Laguerre filter

Modified on 2015/12/29 12:30 by Eugene — Categorized as: Community Indicators

Adaptive Laguerre: Indicator Documentation

Syntax

DataSeries AdaptiveLaguerre( DataSeries ds, int period );

Parameter Description

bars Bars object
ds Data Series
period Lookback period

Description

The Adaptive Laguerre filter is a variation on the Laguerre filter using a variable gamma factor, based on how well the filter is tracking a past Lookback bars prices. Like other adaptive moving averages, it will track trending moves closely but will change less in range-bound markets.

References:


Note:

Do not try to apply AdaptiveLaguerre to itself with the same period; it will cause chart to be stuck in an endless loop. If you need to smooth the AdaptiveLaguerre with itself, use a different period.

Example

This example illustrates how to create the Adaptive Laguerre series and plot them:


using System;
using System.Collections.Generic;
using System.Text;
using System.Drawing;
using WealthLab;
using WealthLab.Indicators;
using Community.Indicators; // Adaptive Laguerre here

namespace WealthLab.Strategies { public class AdaptiveLaguerreDemo : WealthScript { protected override void Execute() { // Create a 30-period adaptive Laguerre series on closing price AdaptiveLaguerre al = AdaptiveLaguerre.Series( Bars,Close,30 ); PlotSeries( PricePane, al, Color.Blue, WealthLab.LineStyle.Solid, 2 ); } } }

And here is how another good adaptive moving average, KAMA, compares to Adaptive Laguerre in a short squeeze environment (Volkswagen, daily):

Adaptive Laguerre vs. KAMA

Adaptive Laguerre vs. KAMA