Log in to see Cloud of Tags

Wealth-Lab Wiki

CG - Center of Gravity Oscillator

RSS

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(); } } }


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.