Skip to main content

cg

Calculate the Center of Gravity.

The Center of Gravity indicator, in short, is used to anticipate future price movements and to trade on price reversals as soon as they happen. However, just like other oscillators, the COG indicator returns the best results in range-bound markets and should be avoided when the price is trending. Traders who use it will be able to closely speculate the upcoming price change of the asset.

Parameters

data: list[openbb_core.provider.abstract.data.Data]

The data to use for the COG calculation.

Optional: False


index: str

Index column name to use with data, by default 'date'

Default: date

Optional: True


length: int

The length of the COG, by default 14

Default: 14

Optional: True


Returns

results: list[Data]

Serializable results.


provider: None

Provider name.


warnings: Optional[list[Warning_]]

list of warnings.


chart: Optional[Chart]

Chart object.


extra: dict[str, Any]

Extra info.


On this page