CG - Center of Gravity Oscillator

Modified on 2008/06/04 17:39 by Administrator — Categorized as: TASCIndicators

Syntax

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

Parameter Description

ds  Source DataSeries
period  Indicator Period

Description

This is the Center of Gravity oscillator by John Ehlers from the May 2002 issue of Stocks & Commodities magazine.

Example

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

namespace WealthLab.Strategies { public class MyStrategy : WealthScript { protected override void Execute() { DataSeries cg0 = CG.Series(Close, 10); DataSeries cg1 = cg0 >> 1; ChartPane cgPane = CreatePane(40, false, true); PlotSeries(cgPane, cg0, Color.Maroon, LineStyle.Solid, 2); PlotSeries(cgPane, cg1, Color.Navy, LineStyle.Solid, 2); HideVolume(); } } }