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!
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Telegram: t.me/sonictraders
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.
نص برمجي مفتوح المصدر
بروح TradingView الحقيقية، قام مبتكر هذا النص البرمجي بجعله مفتوح المصدر، بحيث يمكن للمتداولين مراجعة وظائفه والتحقق منها. شكرا للمؤلف! بينما يمكنك استخدامه مجانًا، تذكر أن إعادة نشر الكود يخضع لقواعد الموقع الخاصة بنا.
Telegram: t.me/sonictraders
إخلاء المسؤولية
لا يُقصد بالمعلومات والمنشورات أن تكون، أو تشكل، أي نصيحة مالية أو استثمارية أو تجارية أو أنواع أخرى من النصائح أو التوصيات المقدمة أو المعتمدة من TradingView. اقرأ المزيد في شروط الاستخدام.