OPEN-SOURCE SCRIPT
Mis à jour ROC with closed based coloring & info table [DB]

Rate of Change (ROC) Basics
The Rate of Change (ROC) is a momentum oscillator measuring the percentage price change between the current close and the close from N periods ago.
Calculated as:Pine Script®
Traders use ROC to:
My improvements:
Visual Clarity
What you can benefit with this over the regular ROC:
Faster Analysis: The visual cues make direction and strength instantly obvious and it allows for faster decision making while preserving more mental capital.
The Rate of Change (ROC) is a momentum oscillator measuring the percentage price change between the current close and the close from N periods ago.
Calculated as:
ROC = [(Current Close - Close N periods ago) / Close N periods ago] * 100
Traders use ROC to:
- Identify overbought/oversold conditions
- Spot momentum shifts
- Confirm trend strength
My improvements:
Visual Clarity
- Color-Coded Direction: ROC line changes color (green/red/yellow) based on intra-candle momentum shifts.
- Direction Table: Instant view of the last change in ROC with the candle close (▲ UP / ▼ DOWN / ▶ FLAT).
- Cells for current value and previous change between timeframe bar period.
What you can benefit with this over the regular ROC:
Faster Analysis: The visual cues make direction and strength instantly obvious and it allows for faster decision making while preserving more mental capital.
Notes de version
Fixed a typo which made the Flat condition display as "UP" on the info tableNotes de version
Made each cell optional to displayScript open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.
Script open-source
Dans l'esprit de TradingView, le créateur de ce script l'a rendu open-source, afin que les traders puissent examiner et vérifier sa fonctionnalité. Bravo à l'auteur! Vous pouvez l'utiliser gratuitement, mais n'oubliez pas que la republication du code est soumise à nos Règles.
Clause de non-responsabilité
Les informations et les publications ne sont pas destinées à être, et ne constituent pas, des conseils ou des recommandations en matière de finance, d'investissement, de trading ou d'autres types de conseils fournis ou approuvés par TradingView. Pour en savoir plus, consultez les Conditions d'utilisation.