trading-signals
    Preparing search index...

    Class CG

    Center of Gravity (CG) Type: Momentum

    Implementation of the Center of Gravity (CG) oscillator by John Ehlers. The Center of Gravity (CG) aims to identify turning points in price action with minimal lag (leading indicator). Peaks and troughs in CG can precede actual price highs and lows. The CG is often paired with its own signal line for entry/exit triggers.

    Interpretation: Crossing the zero line may suggest a shift in trend.

    Note:

    • According to the specification, the price inputs shall be calculated the following way: ((High Price + Low Price) / 2)
    • The selected interval should be half the dominant cycle length (signal line)
    • If the interval gets too short, the CG oscillator loses its smoothing and gets a little too nervous for profitable trading

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    highest?: Big
    interval: number
    lowest?: Big
    prices: Big[] = []
    signal: SMA
    signalInterval: number

    Accessors

    • get isStable(): boolean

      Returns boolean

    Methods

    • Parameters

      • inputs: readonly BigSource[]
      • replace: boolean = false

      Returns (null | Big)[]