trading-signals
    Preparing search index...

    Class CG

    Center of Gravity (CG) Type: Trend

    Implementation of the Center of Gravity (CG) oscillator by John Ehlers.

    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)[]