Blog / Strategy
Strategy

Correlation Cycle Phase Shift

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?

Correlation Cycle Phase Shift is a dominant-cycle timing strategy that fits a single sine wave to recent price and trades the turning points of that fitted wave — a swing-timing approach built around a least-squares sinusoidal regression rather than a conventional moving average or oscillator. Where many "cycle" tools extract a rhythm using recursive smoothing filters, this expert advisor (EA) takes a more direct statistical route: over one assumed cycle length it projects de-meaned closing prices onto two orthogonal reference waves — a cosine and a sine — and measures how closely price actually tracks that ideal cycle.

The key idea is a "cycle strength" reading, labelled M, which ranges from 0 to 1. A value near 1 means a clean single cycle explains price movement very well; a value near 0 means price is behaving like noise or a straight trend, where fitting a sine wave is meaningless. The strategy only acts on the wave's turns when M is high enough, so it is designed for liquid, range-prone or swinging markets — think FX majors and metals such as EURUSD, USDJPY, or XAUUSD on intraday timeframes — rather than for strongly trending conditions.

As a learning tool, Correlation Cycle Phase Shift is well suited to traders who want to understand how signal-processing concepts (phase, amplitude, correlation) can be applied to price data, and how a regime filter can be used to suppress trades in unfavourable conditions. It is a study in disciplined, conditional entries — not a shortcut to results. Treat it as a way to explore cycle analysis, not as a finished system.

How It Works

The strategy works entirely on closed primary-timeframe bars and evaluates once per new bar. On each new bar it re-fits the cycle and looks for a change in the fitted wave's direction (its slope), gated by the cycle-strength filter.

In short, the strategy signals only at cycle turns that occur while a measurable cycle is present, then manages the trade with a volatility-based stop and a fixed reward-to-risk target.

correlation cycle phase shift EA
Illustrative example of the strategy’s entry and exit logic — not real trading results.

Strategy Parameters

Parameter Default Min Max Description
CyclePeriod 20 8 60 Assumed dominant cycle length and the correlation/fit window, in bars. Larger values track slower swings; smaller values track faster ones.
CycleStrengthMin 0.55 0.20 0.90 Minimum cycle strength M required to trade a turn. Higher values demand a cleaner, more convincing cycle before entering.
AtrPeriod 14 5 40 Lookback period for the ATR volatility measure used to size the stop.
AtrStopMult 2.0 0.5 5.0 Stop-loss distance as a multiple of ATR beyond the entry price.
TpRewardRisk 1.5 0.5 4.0 Take-profit distance expressed as a reward-to-risk multiple of the ATR stop.
MaxSpreadPoints 80 5 300 Skip new entries when the current spread (in points) is wider than this value.
Lots 0.10 0.01 1.0 Order volume (position size) in lots.
Magic 8123 0 9,999,999 Magic number used to identify and manage this EA's own positions.
correlation cycle phase shift EA — MQL5 source code

Recommended Chart Settings

Correlation Cycle Phase Shift was designed with liquid, range-prone FX majors and metals in mind — for example EURUSD, USDJPY, or XAUUSD — on intraday timeframes around M15 to H1, where mean-reverting swing cycles are more common. These conditions give a fitted sinusoid the best chance of describing price behaviour.

The EA runs on whatever symbol and timeframe the chart is set to at run time, so you are free to test it elsewhere. Keep in mind that cycle behaviour, volatility, and spread characteristics differ widely between instruments and sessions, so results will vary across different market conditions. 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

Every strategy involves trade-offs, and understanding them is part of using any tool responsibly.

Strengths of this approach:

Known limitations:

The strategy may underperform in persistent one-directional trends, in extremely low-volatility drift, or during news-driven spikes. Treat it as one lens on the market rather than a complete answer.

Risk Management Tips

Sound risk management matters more than any single entry rule. Consider these general principles:

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