Composite & famous

Center of Gravity · COG

John Ehlers' near-zero-lag oscillator that pinpoints cyclical turning points.

Works best in ranging marketsEngine-computed on a fixed sample series
14512096Above zero = bullish momentumBelow zero = bearish momentum
COG 4.04Signal 4.38How to read COG on the chart — the callouts mark what to look for.

The formula

Weight each bar in the window by how far back it sits, add those up, divide by the total price to find the balance point, then measure that point against the window's midpoint. The result swings around zero and is read with a signal line.

CG = (N + 1) ÷ 2 − Σ(position × Priceₚ) ÷ Σ(Priceₚ)
Worked example
Bar (ago)PriceBar × Price
11010
21224
31133
4936
Total42103

Balance point = 103 ÷ 42 = 2.45; against the midpoint 2.5 the COG reads +0.05

What it is

The Center of Gravity oscillator (COG) is a leading, near-zero-lag oscillator designed by engineer John Ehlers and introduced in a 2002 article. It borrows the physics idea of a balance point: if you imagine the last several prices as weights hung along a lever, the center of gravity is the fulcrum where the lever would balance. Ehlers showed that because this balance point of a short window of prices shifts almost the instant prices turn, the resulting oscillator carries virtually no lag, unlike a moving average. The question it answers is where, within the recent window, the mass of price is concentrated, and whether that mass is sliding toward the newest bars (turning up) or the oldest (turning down). It is built for cyclical, ranging markets where catching turns early is the whole point.

How it is calculated

COG uses a lookback window (10 bars is the default) and treats each price as a mass sitting at a time position. The core is a pair of weighted sums: a numerator of Sum of (1 + i) x Price[i] for i running from 0 at the most recent bar to N-1 at the oldest, and a denominator of the plain Sum of Price[i] over the same window. Ehlers computes CG = -numerator / denominator and then adds (N + 1) / 2 to recenter the line so it swings around zero rather than around the middle of the window. The price input is usually the median price, (High + Low) / 2, though close can be used. The output is normally paired with a signal line, which is just the COG value delayed by one bar, and trades come from the two lines crossing. Because it is a ratio of weighted sums rather than a smoothed average, it reacts the moment the newest price shifts the balance.

Reading it, step by step

Read COG first by its crossovers with its lagged signal line: when COG troughs and crosses up through the signal line, the balance of recent price has tipped toward the newest bars, an early buy cue, while a peak and downward cross is the mirror sell cue. Because the oscillator has almost no lag, its turns tend to arrive at or just before price turns, which is its entire selling point in cyclic markets. The distance of COG from its zero midline gives a rough overbought or oversold read: stretched high means recent weight sits near the top of the window, stretched low near the bottom. In a strong one-way trend, however, the oscillator saturates at an extreme and its crossovers become unreliable, so slope and midline context matter as much as the raw cross. The cleanest signals come when the market is genuinely swinging up and down rather than trending hard in one direction.

Reading the signals on the chart

14512096
COG 4.04Signal 4.38The ▲/▼ marks flag the most recent zero-line crossings, where momentum flips from negative to positive and back.

Best timeframes

  • Scalping1m – 5msmooth markets only
  • Day trading5m – 15m
  • Swing1h – 4hcyclical names
  • PositionDailyless reliable in strong trends

COG is a cycle tool — it earns its keep on rotating, ranging instruments and fights you in a hard trend.

COG vs other cycle oscillators

COGFisherStochastic
LagNear zeroLowModerate
Design goalLow lagSharp turnsRange position
Bounded rangeNoNoYes
Best regimeCyclesCyclesRanges

Common price-action setups

How the signal typically plays out on the chart.

COG crosses up its signal

After a swing to the lower extreme, the COG line crosses up through its signal line — enter long on the cross and stop just below the recent price pivot.

Buy the cross-up
Cycle turns up
COG crosses down its signal

From the upper extreme the COG rolls down through its signal line — short the cross and stop just above the swing high.

Sell the cross
Cycle turns down
Bullish COG divergence

Price prints a lower low while COG makes a higher low — enter as the COG turns up and stop beneath the price low.

Buy divergence
Reversal off the low

Best timeframes and settings

The default window is 10 bars, which Ehlers tied to roughly half of a typical trading cycle; shorten it toward 8 for faster, noisier turns and lengthen toward 14 to 20 for smoother, later ones. It is fundamentally a cycle-mode tool, so it performs best on timeframes and instruments that oscillate in fairly regular swings, such as intraday charts of liquid futures and daily charts of range-bound stocks or currencies. The essential trade-off is the familiar window dilemma: a shorter lookback makes the balance point jump around and fire more false crosses, while a longer one steadies the signal but reintroduces the lag COG was built to avoid. Ehlers recommended pairing it with his cycle-measurement tools so the window can be matched to the market's actual dominant cycle length. On strongly trending daily charts the oscillator is far less useful and should be relaxed or set aside.

When and where to use it

Use COG when you specifically want early entries in a market that swings up and down in cycles rather than trending hard, because its near-zero lag is wasted, even dangerous, in a runaway move. It suits liquid, mean-reverting instruments: index futures in a balanced session, currency pairs in a range, or stocks chopping between support and resistance. It is a poor choice for breakout or momentum trading, where its early turns will fight the trend and produce a stream of losing counter-trend signals. Reach for it when your analysis says the market is in a ranging or cycling regime and you have a separate way to confirm that regime. Avoid it in thin, gappy names where a single spike distorts the weighted balance and throws the oscillator off for several bars afterward.

Strategies that use it

Signal-line crossover: buy when COG crosses above its one-bar-lagged signal line from a trough below zero, and sell or exit when it crosses below from a peak above zero, keeping stops beyond the recent swing. Zero-line reversion: in a confirmed range, fade extremes by buying when COG turns up from a deep negative reading and selling when it rolls over from a high positive reading, targeting the midline. Regime-gated crossover: take COG crosses only while a trend filter, such as a flat ADX or price inside a horizontal channel, confirms the market is ranging, and stand aside entirely when the filter says a trend has begun. Across all three versions the discipline is identical: trust the tool only in cycling conditions and cut it off the moment a trend takes hold.

Combining it with other indicators

Because COG gives early timing but no regime context, pair it with a trend-strength gauge such as ADX so you only act on its crosses when ADX is low and the market is genuinely ranging. A dominant-cycle measurement, including Ehlers' own cycle-period tools, lets you set the window to the market's real swing length instead of guessing. Horizontal support and resistance or Bollinger Bands supply price context, so a COG buy that lines up with the lower band or a support shelf is far stronger than one in mid-range. A slower confirmation oscillator like the stochastic can be required to agree, filtering out the whipsaw crosses COG produces when the market briefly trends. The general rule is to let COG handle timing while other tools decide whether that timing should be trusted at all.

Where it fails

COG's Achilles heel is trending markets: its near-zero lag means it turns against every pullback in a strong move, firing repeated counter-trend signals that stop out. In choppy, low-amplitude noise it also flips its crossovers rapidly, so without a regime filter it can churn a position with tiny back-and-forth signals. Single spikes and gaps distort the weighted balance because one outsized price carries disproportionate weight in the numerator, skewing the oscillator for the length of the window. It is also more sensitive to the choice of price input and window than a plain moving average, so different platform defaults can produce visibly different lines. The classic mistake is deploying it as an all-weather oscillator; it is a specialist cycle tool, and using it in a trend is where most of its losses come from.

A worked example

Take a 3-bar window for clarity with median prices of 10 (oldest), 11, and 13 (newest). Index them i = 2, 1, 0 from the newest bar, so the numerator is (1+0) x 13 + (1+1) x 11 + (1+2) x 10 = 13 + 22 + 30 = 65, and the denominator is 13 + 11 + 10 = 34. Raw CG = -65 / 34 which is about -1.91, and recentering by (N+1)/2 = 2 gives COG of about 0.09, a slightly positive reading reflecting that the heaviest recent price, the 13, is the newest bar tugging the balance toward the top. If the next bar prints 9, the window slides and the newest price now drags the balance down: the numerator becomes (1) x 9 + (2) x 13 + (3) x 11 = 9 + 26 + 33 = 68 over a denominator of 9 + 13 + 11 = 33, so raw CG is about -2.06, recentered to about -0.06. The oscillator has flipped from positive to negative in a single bar, showing how quickly the balance point, and therefore COG, responds when the newest price changes direction.

Common mistakes

  • Forcing COG onto a trending market, where its low-lag turns flip back and forth against the move.
  • Trading every signal-line crossover without confirming a cyclical swing to an extreme first.
  • Treating its near-zero lag as accuracy — early turns still need price structure to confirm.
  • Using it on illiquid or gappy instruments where the price window is distorted.
  • Ignoring the higher-timeframe trend that decides whether a cycle read is even valid.