OPEN-SOURCE SCRIPT

5-Period Average of Returns (Close)

49
This indicator calculates the 5-period average of returns of the closing price, providing a detrended, zero-centered oscillator ideal for cycle analysis and timing.

Key Features:

Detrended: Centers around zero to clearly reveal cyclical patterns.

Cycle-friendly: Highlights peaks and troughs for measuring dominant cycles.

Flexible: Can be applied to multiple timeframes (daily, weekly, intraday).

Zero Line Reference: Quickly identify directional shifts in average returns.

Foundation for Advanced Analysis: Can be combined with RSI, statistical bands, or multi-timeframe studies.

Use this indicator to:

Identify dominant cycles and their phase

Measure cycle length and rhythm

Assist in entry and exit timing based on average-return oscillations

Detrend price data for more precise technical and cyclical analysis

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.