OPEN-SOURCE SCRIPT

RSquared (log prices)

101
Rolling Trend R² measures the strength of trends using a rolling R² calculation on log prices. Values near 1 indicate a strong, persistent trend, while low values signal choppy or mean-reverting conditions. Includes regime highlighting, reference levels, and an info panel for quick market state identification.

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.