Log in to see Cloud of Tags

Wealth-Lab Wiki


public DEMA(DataSeries ds, int period1, int period2, string description)
public static DEMA(DataSeries ds, int period1, int period2)

Parameter Description

period1Length used to create the EMA
period2Length used to double smooth the EMA


The Double Exponential Moving Average (DEMA) by Patrick G. Mulloy was introduced in his January 1994 article in the "Technical Analysis of Stocks & Commodities" and attempts to remove the moving average lag by emphasizing its more recent values. Accordning to Mulloy, "the DEMA is not just a double EMA with twice the lag time of a single EMA, but is a composite implementation of single and double EMAs producing another EMA with less lag than either of the original two."




Similar to EMA.


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

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { // Dual DEMA CrossOver System var dema1 = DEMA.Series( Close, 12, 26 ); var dema2 = DEMA.Series( Close, 21, 55 ); PlotSeries( PricePane, dema1, Color.Red, LineStyle.Solid, 2 ); PlotSeries( PricePane, dema2, Color.Blue, LineStyle.Solid, 2 ); // DEMA is one of unstable indicators, initialize the loop accordingly for(int bar = 55*3; bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( CrossUnder( bar, dema1, dema2 ) ) SellAtMarket( bar+1, LastPosition ); } else { if( CrossOver( bar, dema1, dema2 ) ) BuyAtMarket( bar+1 ); } } } } }

Important Disclaimer: The information provided by Wealth-Lab is strictly for informational purposes and is not to be construed as advice or solicitation to buy or sell any security.  The owner of Wealth-Lab.com assumes no liability resulting from the use of the material contained herein for investment purposes. By using this web site, you agree to the terms of this disclaimer and our Terms of Use.

ScrewTurn Wiki. Some of the icons created by FamFamFam.