slope is true when an indicator is rising or falling over a
chosen lookback. It compares the indicator's current value against its
value lookback bars ago - no second indicator needed.
Shape
{ "type": "slope", "indicator": "adx_14_plus", "direction": "rising", "lookback": 1 }Params
indicator- the column to watch.direction-rising(now > N bars ago) orfalling(now < N bars ago).lookback- bars to look back. Default1(versus the previous bar).
Why use it
Many trend setups care about momentum of an indicator, not just its level. Examples:
- DI momentum:
adx_14_plus rising+adx_14_minus fallingmeans the up-move is gaining strength while selling fades - a confirmed, strengthening uptrend. - Slowing trend:
adx fallingwarns a trend is losing steam even while it is still technically up.
Before this condition existed the same idea had to be written as a
self-referential comparison with a hidden shift (+DI[prev] < +DI),
which read as nonsense in the builder. slope makes the intent explicit
and exposes the lookback directly.
Pitfalls
- It only checks direction, not magnitude. A 0.01 uptick counts as rising. Combine with a level check (e.g. a threshold) if you need the indicator to also be in a certain range.
- Larger lookback lags.
lookback: 5is steadier but slower to flip thanlookback: 1.
