WilderMA

Modified on 2008/05/03 16:27 by Administrator — Categorized as: Standard Indicators

Syntax

public static WilderMA Series(DataSeries source, int period) public WilderMA(DataSeries source, int period, string description)

Parameter Description

source The source DataSeries
period Indicator calculation period

Description

WilderMA is sometimes call Wilder's Smoothing, and it returns a moving average as calculated by Welles Wilder in his book New Concepts in Technical Trading. This indicator is similar to the Exponential Moving Average. Compared to other moving averages, WildersMA responds slowly to price changes. A n-period WilderMA gives similar values to a 2n period EMA. For example, a 14-period EMA has almost the same values as a 7-period WilderMA.

Interpretation


Calculation

WilderMA is calculated for periods "n" as follows:

Wilder MA = ( Previous Wilder MA * ( n - 1 ) + DataSeries Value ) / n


where,

n = number of periods
DataSeries Value = data you wish to average

Example

using System; using System.Collections.Generic; using System.Text; using System.Drawing; using WealthLab; using WealthLab.Indicators;

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Compare a Simple and Exponential Moving Average with Wilder's MA int n = 14; PlotSeries( PricePane, WilderMA.Series( Close, n ), Color.Lime, LineStyle.Solid, 2 ); PlotSeries( PricePane, SMA.Series( Close, n ), Color.Red, LineStyle.Solid, 1 ); PlotSeries( PricePane, EMA.Series( Close, 2*n, EMACalculation.Modern ), Color.Blue, LineStyle.Solid, 1 ); } } }