Blog / Strategy
Strategy

Center Of Gravity Oscillator Reversal

Disclaimer: This article is for educational and informational purposes only. It does not constitute financial or investment advice. Trading forex and CFDs carries significant risk of loss. Past performance of any strategy — including backtests — does not guarantee future results. Never trade with money you cannot afford to lose.

What Is This Strategy?

The Center Of Gravity Oscillator Reversal is a swing-trading strategy built around John Ehlers' Center of Gravity (COG) oscillator, a low-lag momentum indicator that measures where the "weight" of recent price action is concentrated within a lookback window. Instead of chasing breakouts, this is a mean-reversion / cycle-turning approach: it waits for the oscillator to form a confirmed turning point and then trades in the direction of the expected swing.

The Center of Gravity oscillator works much like the physical concept it borrows its name from. It calculates the price-weighted "balance point" of the last several bars. When recent bars carry more of the price mass, the oscillator leans positive (relative strength); when older bars dominate, it leans negative (relative weakness). Because the COG is a ratio of price sums, it is naturally normalized — it does not scale with the absolute price of the instrument, so the same threshold levels behave consistently on EUR/USD, gold, or any other symbol.

This strategy is designed for ranging or cyclic market conditions on intraday timeframes, and it is best treated as a learning tool for traders who want to understand oscillator-based reversal logic, pivot confirmation, and volatility-adaptive risk placement. It is well suited to cyclic majors and metals such as EUR/USD or XAU/USD, though the underlying code is timeframe-agnostic. If you are studying how cycle-turning indicators translate into concrete entry rules, this strategy offers a clean, transparent example.

How It Works

The strategy processes one closed bar at a time. On each newly completed bar it recalculates the oscillator, smooths it, and checks whether a turning point has just been confirmed. Here is the logic in plain English:

Stop-loss and take-profit logic are both derived from the ATR (Average True Range), an indicator that measures recent volatility:

center of gravity oscillator EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
CgPeriod 10 5 40 Number of bars in the Center of Gravity lookback window. Larger values produce a slower, smoother oscillator; smaller values react faster but are noisier.
SmoothPeriod 3 1 12 EMA smoothing period applied to the raw COG. Higher values suppress noise but add lag to pivot confirmation.
AtrPeriod 14 5 50 Number of bars used to calculate ATR for volatility-scaled stops and targets.
StopMult 1.6 0.5 4.0 ATR multiple that sets the stop-loss distance. Larger values give wider stops and more room, at the cost of larger risk per trade.
RewardRatio 1.5 0.5 5.0 Take-profit distance as a multiple of the stop distance. A value of 1.5 targets 1.5 units of reward per 1 unit of risk.
Lots 0.10 0.01 1.0 Fixed trade volume in lots for each position.
center of gravity oscillator EA — MQL5 source code

Recommended Chart Settings

The Center Of Gravity Oscillator Reversal strategy was designed with cyclic majors and metals in mind — for example EUR/USD or XAU/USD (gold) — traded on intraday timeframes such as M15, M30, or H1, where short-term cyclic swings are more pronounced. Because the oscillator is self-normalizing, the same default parameters can be applied across instruments without rescaling thresholds.

That said, the code is timeframe-agnostic and will run on whatever primary symbol and timeframe you attach it to. Results will vary considerably across different symbols, timeframes, and market conditions, so treat these as starting points for study rather than fixed rules. Always test any configuration on historical data and a demo account before drawing conclusions.

How to Install on MetaTrader 5

What to Consider Before Using This EA

Like any single-indicator system, this strategy has clear strengths and equally clear limitations, and understanding both is the point of studying it.

Strengths:

Limitations:

This strategy is best understood as an educational framework for oscillator-based reversals — not a finished, hands-off system. Its behavior in a live-like environment depends heavily on the symbol, timeframe, and prevailing regime.

Risk Management Tips

Sound risk management matters far more than any single entry signal. Whether you are studying this strategy or any other, keep these principles in mind:

Risk Warning

Trading foreign exchange, CFDs, and other leveraged financial instruments involves substantial risk of loss and is not suitable for all investors. The strategies and tools discussed on this page are provided for educational purposes only and do not constitute financial advice, investment recommendations, or solicitation to trade. Always consult a qualified financial adviser before making trading decisions. Past backtest performance is not indicative of future results.

Downloads

← Back to Blog