Modified on 2008/05/03 08:41 by Administrator — Categorized as: Standard Indicators


public Momentum(DataSeries ds, int period, string description)
public static Momentum Series(DataSeries ds, int period)
public static double Value(int bar, DataSeries ds, int period)

Parameter Description

ds The source DataSeries
period Indicator calculation period


Momentum is the difference between current price and the price a specified number of bars ago, period. The momentum indicators shows the speed at which price changes from one period to another. It give a excellent indication of the market participants commitment to the current trend. When the momentum begins to slow or turn, it indicates diminishing commitment and a loss of momentum. This indicator is a leading or coincidental indicator. A momentum value above zero indicates that prices are moving up, and below zero moving down.

The momentum indicator has overbought and oversold zones. These zones are defined by lines that are placed so the Momentum indicator spends about 5% of its time within the zones. The lines should be adjust according to market conditions.



Momentum = Pricetoday - Pricen periods ago

Typically, the closing DataSeries, Close, is used.


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() { // This Strategy plots absolute momentum, and calculates momentum as a percentage of current price.

DataSeries mom30 = Momentum.Series( Close, 30 ); mom30.Description = "Standard Momentum"; DataSeries MomPct = mom30/Close; MomPct *= 100; MomPct.Description = "Percentage Momentum"; ChartPane MomPane = CreatePane( 30, true, true ); ChartPane MomPctPane = CreatePane( 30, true, true );

PlotSeries( MomPane, mom30, Color.Black, WealthLab.LineStyle.Histogram, 3 ); PlotSeries( MomPctPane, MomPct, Color.Black, WealthLab.LineStyle.Histogram, 3 ); } } }