Trend acceleration
Bar-to-bar change in an input slope, showing whether a trend is speeding up or slowing down.
It takes the slope series connected to it and outputs this bar's slope minus the previous bar's, so it is the first difference of that slope. The docstring calls it the second derivative of price, which holds only when the input is a slope of price. The first value after a reset reads 0.0 rather than a real change.
How to read it
- The line sits in its own pane below the price, centred on zero, in the input slope's units per bar.
- Above zero the input slope is rising bar to bar; below zero it is falling. Read the sign against the slope itself: a positive value on a falling slope means the fall is easing.
- On SPY one-minute bars for September 2026, about 90% of readings sat between -0.21 and 0.21, so only readings beyond those lines mark a sharp change.
What it outputs
- Slope change per bar
- The input slope's change since the previous bar. Positive means the slope rose, negative that it fell, in the input's units per bar.
Pitfalls
- The code is a first difference of its input, not a true second derivative of price. Connect a series other than a price slope and the output means something else.
- Differencing amplifies noise. Readings reached -5.36 and 3.56, but those extremes are rare outliers and do not show a sustained change in trend on their own.
- Values are in the input's units, so 0.21 means nothing across different inputs. Judge a reading against its own recent history.