OPEN-SOURCE SCRIPT

Rate of Change Indicator

541
Hi,
I just vibe~coded a "Rate of Change" indicator using US 10Y Bond Yield as a reference. The idea is simple — instead of just looking at where bond yields are, this indicator measures how fast they're changing, which can give you an early read on momentum shifts in the market.

The indicator calculates the percentage change in the close price over a set lookback period (default: 14 bars). When the ROC is rising and positive, it signals accelerating upward momentum in yields — typically a bearish signal for equities and risk assets. When it's falling and negative, it suggests yields are losing downside momentum, which can be a relief signal for the broader market.

The histogram bars are color-coded for quick reading — teal for bullish momentum, red for bearish, and faded versions of each when momentum is weakening. A subtle background tint reinforces the overall bias at a glance.

It also comes with built-in alerts for when the ROC crosses above or below zero — those zero-line crossovers are often the cleanest signal of a momentum regime change worth paying attention to.

Give it a try on your bond yield charts (or) any instruments that you prefer and let me know what you think!

Declinazione di responsabilità

Le informazioni e le pubblicazioni non sono intese come, e non costituiscono, consulenza o raccomandazioni finanziarie, di investimento, di trading o di altro tipo fornite o approvate da TradingView. Per ulteriori informazioni, consultare i Termini di utilizzo.