+1 888 340 6572

Oscillators > The Center Of Gravitation

Article/Author: "The Center Of Gravitation Oscillator", John F.Ehlers, S&C magazine, May 2002

File Includes: Indicator - CenterOfGravitation

Category: Indicator > Oscillators

Description:

This indicator identifies every major turning point without much lag. This indicator is computed in a similiar way to the Ehlers filter. The position of the balance point is the summation of the product of position within the observation window multiplied by the price at that position divided by the summation of prices across the window. The formula is:

CG = SUM(x+1) * Price(i) / SUMPrice(i)

In this formula "1" is added to the position count because it starts with the most recent price at zero, and multiplying the most recent price by that position count would remove it from the computation.

Usage:

This indicator clearly identifies the turning points So look for the indicator`s crossovers to see what to do. The lenght of indicator should be equal the half of dominant cycle.

Inputs:

Length - number of bars to calculate

Easy Language Code:
```Inputs: Price((H+L)/2), Length (10);

Vars: count(0), Num(0), Denom(0), CG(0);

Num=0;
Denom=0;

For count = 0 to Length - 1 begin
Num = Num + (1 + count)*(Price[count]);
Denom = Denom + (Price[count]);
End;

If Denom <> 0 then CG = - Num/Denom;

Plot1(CG, "CG");
Plot2(CG[1], "CG1");
```