talib.cog
Centre of gravity of source across a window of length bars.
talib.cog(series float source, series int length) → series float| Parameter | Type | Required | Description |
|---|---|---|---|
source | series float | yes | The series to measure. |
length | series int | yes | How many bars the window covers. |
Returns series float — A series float.
indicator("Centre of gravity")
plot(talib.cog(close, 10))See also talib.alma · talib.atr · talib.barssince
Part of the function index.
Ready to put this into practice?
Try GoCharting Premium
Unlock advanced orderflow, market profile, options desk, and real-time data — everything you just read about, live in your charts.