Modified on 2008/04/14 09:55 by Administrator — Categorized as: Standard Indicators


public CMO(DataSeries source, int period, string description)
public static CMO Series(DataSeries source, int period)
public static double Value(int bar, DataSeries source, int period)

Parameter Description

source Price series
period Indicator calculation period


The Chande Momentum Oscillator is similar to RSI or Stochastics. It is calculated by dividing the sum of up day and down day activity into the difference of up day and down day activity. The result is then multiplied by 100 to arrive at an indicator that oscillates between -100 and 100. A typical value for number of periods, Period, for the CMO is 20.



CMO = 100 * ( ( Su - Sd )/( Su + Sd ) )


Su = Sum of prices on up days for the specified Period
Sd = Sum of prices on down days for the specified Period


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 simple system buys when CMO is oversold, and sells when CMO is overbought */ for(int bar = 20; bar < Bars.Count; bar++) { if (IsLastPositionActive) { if( CMO.Value( bar, Close, 20 ) > 45 ) SellAtMarket( bar+1, LastPosition, "CMO Exit" ); } else { if( CMO.Series( Close, 20 )[bar] < -55 ) BuyAtMarket( bar+1, "CMO Entry" ); } } } } }