All indicators

Linear Regression Histogram

By LuxAlgoOct 25, 2021

Static chart image

Linear Regression Histogram treats a trend the way a statistician treats a dataset. It fits a least-squares regression through recent closes, wraps the fit in a regression channel sized by a multiple of the RMSE, slices that channel into equal-width bins, and counts how many price values land in each one. Bins collecting an outsized share of hits are highlighted in blue: the zones this trend keeps coming back to.

How to Trade the Linear Regression Histogram?

  • Highlighted bins: prices cluster there more than anywhere else in the channel, marking zones of interest inside the prevailing trend.
  • Revisit behavior: because these intervals have absorbed price repeatedly, they can act like support or resistance that follows the trend rather than sitting at a fixed level.
  • Granularity control: more bins carve the channel into finer zones, fewer bins merge activity into broader areas. Match the resolution to how precise your entries need to be.

As the regression rolls forward, the channel and its bins update with it, so the highlighted zones always describe the current fit rather than stale structure.

Linear Regression Histogram Settings

  • Length: how many past closing prices feed the regression. Longer settings describe the broader trend, shorter ones hug recent action.
  • Bins Number: the number of intervals the channel is divided into, controlling how granular the frequency map is.
  • Mult: multiplies the RMSE to set channel width. Raise it to capture more of the price action, lower it to focus on the trend's core.
  • Src: the price source used for the analysis.

Frequently Asked Questions

Free indicator

Get free access to this indicator on the platforms below.

TradingView
NinjaTrader
MetaTrader 4/5
Original indicatorBuilt in-house by LuxAlgo

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.