COG Pass
Centre of Gravity Oscillator — Series Input
IndicatorTrendOverlay
Overview
COG Pass applies John Ehlers's Centre of Gravity oscillator to any upstream numeric series. It measures where price "mass" is concentrated within a rolling window, producing a near-zero-lag oscillator useful for identifying turning points.
Formula
COG[t] = −Σ(x[t−i]·(i+1)) / Σ x[t−i] for i = 0..period−1
Parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
| period | number | 10 | Window length in bars. |
Inputs & Outputs
| Port | Direction | Type | Description |
|---|---|---|---|
| input | Input | (number | null)[] | Any numeric series (values + timestamps). |
| values | Output | (number | null)[] | Smoothed output series, null for warm-up bars. |
| timestamps | Output | number[] | Bar timestamps aligned with values. |