OPEN-SOURCE SCRIPT
Rate of Change Indicator

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!
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!
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Telegram: t.me/sonictraders
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.
Mã nguồn mở
Theo đúng tinh thần TradingView, tác giả của tập lệnh này đã công bố nó dưới dạng mã nguồn mở, để các nhà giao dịch có thể xem xét và xác minh chức năng. Chúc mừng tác giả! Mặc dù bạn có thể sử dụng miễn phí, hãy nhớ rằng việc công bố lại mã phải tuân theo Nội quy.
Telegram: t.me/sonictraders
Thông báo miễn trừ trách nhiệm
Thông tin và các ấn phẩm này không nhằm mục đích, và không cấu thành, lời khuyên hoặc khuyến nghị về tài chính, đầu tư, giao dịch hay các loại khác do TradingView cung cấp hoặc xác nhận. Đọc thêm tại Điều khoản Sử dụng.