ROC-of-ROC
By LuxAlgoJun 19, 2026
ROC-of-ROC plots the acceleration of price: a 9-bar percent rate of change — velocity — differenced again over 9 bars. The line runs positive while momentum is still building and turns negative once it starts to fade, often while price is still pressing on. The definitive clean build of ROC-of-ROC takes the second pass as a difference rather than a percent change and colors the acceleration line by a four-state read: advance or decline from velocity's sign, accelerating or decelerating from acceleration's.
How to Trade the ROC-of-ROC?
- Zero crosses: acceleration crossing above zero says momentum stopped decaying and started building; crossing below says the opposite — both arriving before momentum itself crosses zero.
- Deceleration warnings: velocity positive with acceleration negative is an advance still rising but losing thrust — a cue to tighten risk, not an automatic reversal call. The mirrored state is an early basing cue.
- Velocity context: read the acceleration sign against the velocity line; agreement is thrust, a split is the early warning.
Four alerts cover both zero crosses and the first bar of each deceleration state; optional circles mark those bars.
ROC-of-ROC Settings
- Source (default close): series both derivatives run on.
- Velocity Length (default 9): lookback of the first rate of change.
- Acceleration Length (default 9): bars over which the change in velocity is measured.
- Method (default SMA): average type used by both smoothing steps.
- Source Smoothing (default 1): pre-smoothing of the source; 1 keeps the textbook construction.
- Acceleration Smoothing (default 3): smoothing on the final line, filtering false starts around zero.
- Velocity Context Line (default enabled), Deceleration Warning Markers (default disabled), Gradient Fill (default enabled); Style colors set the four states.
Frequently Asked Questions
How is this different from a plain Rate of Change?
By one derivative. Rate of Change measures how fast price is moving; ROC-of-ROC asks whether that speed is building or fading. The second derivative turns earlier — and pays for that lead in noise, hence the default output smoothing.
Why is the second pass a difference instead of a percent change?
Velocity crosses zero, and a percent change of a series near zero divides by tiny numbers, producing unstable readings. The difference form keeps the acceleration line well-behaved through momentum flips.
Should the deceleration warnings be traded on their own?
Treat them as context: they say thrust is fading, not that price reverses here. Pair them with structure or a slower momentum gauge before acting.
The Library is free. Quant makes it yours.
Pull any concept or indicator into Quant: rebuild it, retune it, or turn it into a backtested strategy of your own.
