INVITE-ONLY SCRIPT

Correlation Cycle Strategy - Level 1

50
This strategy is based on John Ehlers idea of the correlation cycle, and that markets often oscillate. They move up and down in cycles, though not perfectly sinusoidal, they can be approximated by a sinusoidal wave. This script measures the strength of the correlation between price and a range of ideal sine wave components of different periods. By doing this, we estimate which cycle length the market is most currently following and from that, we find the phase to learn in which part of the cycle we are in.

Bull (green) – when price is at the bottom of the sinusoidal going to the top (positive phases), the strategy favors long entries.
Bear (red) – when price is at the top of the sinusoidal going down to the bottom (negative phases), the strategy favors short entries.
Range (brown) – when the phase is in the transition zones we detect range conditions and no trades are initiated.

The transition between these regimes depends mainly on 3 key parameters.
The first parameter controls the maximum lookback period for correlation detection and so the maximum cycle length.
The second controls how much range is detected in bull conditions, it changes the transition from bull to range conditions. The bigger it is, the less bull and the more range.
The third parameter is similar to the second, but for bear conditions. The bigger it is, the less bear and the more range conditions are detected

The user can configure the strategy to run long-only, short-only, or both directions, depending on the market or preference. In addition to the core regime logic, the strategy includes several risk and trade management controls that are featured in all my strategies.

Four oscillators are also integrated into the logic to detect short-term overbought and oversold conditions. These help the strategy avoid entering or exiting a trade when price has already extended too far in one direction, improving timing and potentially reducing false entries and exits. When overbought or oversold are detected, a red or green dot appears on the chart.

The script is designed to be flexible across different assets and timeframes. However, to achieve consistent results, it is important to optimize parameters carefully. A recommended workflow is as follows:

Disable the walk-forward option during the optimization phase.
Optimize the first main parameter while keeping others fixed.
Once a satisfactory value is found, move to the second parameter.
Continue the process for subsequent parameters.
Optionally, repeat the full sequence once more to refine the results.
Finally, activate walk-forward analysis and check the out-of-sample results.

This strategy is published as invite-only with hidden source code. Access may be granted upon request for research or evaluation purposes. It is part of a broader collection of technical analysis strategies I have developed, which focus on regime detection and adaptive trading systems.

There are five levels of strategy complexity and performance in my collection. This script represents a Level 1 strategy, designed as a solid foundation and introduction to the framework. More advanced levels progressively add greater complexity, adaptability, and robustness.

When multiple strategies are combined under this same framework, the results become more robust and stable. In particular, combining my suite of technical analysis strategies with my macro strategies and alternative data strategies, such as onchain for cryptocurrencies. It creates a multi-layered system that adapts across regimes, timeframes, and market conditions.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.