cg#

API documentation for pandas_ta.momentum.cg Python function.

cg(close, length=None, offset=None, **kwargs)[source]#

Center of Gravity (CG)

The Center of Gravity Indicator by John Ehlers attempts to identify turning points while exhibiting zero lag and smoothing.

Sources:

http://www.mesasoftware.com/papers/TheCGOscillator.pdf

Calculation:
Default Inputs:

length=10

Args:

close (pd.Series): Series of ‘close’s length (int): The length of the period. Default: 10 offset (int): How many periods to offset the result. Default: 0

Kwargs:

fillna (value, optional): pd.DataFrame.fillna(value) fill_method (value, optional): Type of fill method

Returns:

pd.Series: New feature generated.