TREND, MOVING AVERAGES & STRUCTURE
Linreg slope
How fast the trend is rising or falling — dollars per candle.
spec id: linreg_slopelength (default 14)
What does Linreg slope measure?
How fast the trend is rising or falling — dollars per candle. Positive is up, negative is down, and the size tells you how steep.
How is Linreg slope calculated?
Fit a straight line through the last 14 closing prices and report how much the line climbs per candle.
Written by reading the engine’s real computation, not a textbook — where the two differ, the page describes what actually runs.
How do I use Linreg slope in a bot?
In the builder, add an indicator of type linreg_slope (parameters: length, default 14). Its value becomes an operand you can compare in any entry or exit rule. The engine grades the whole rule honestly: real fills, no look-ahead, half the history held back.
Related indicators
- Log returnThe one-candle return in logarithmic form.
- Least-squares MAA moving average built from a straight-line fit rather than a plain mean.
- McGinley dynamicA trend line that adjusts its own speed to the market, so it hugs price in fast moves instead of falling behind like a fixed-length average.
- Rolling medianThe middle closing price of the recent window.
Or browse all 158 indicators in the full library.