Linear Regression Fan [LuxAlgo]

This indicator displays a fan using a linear regression fit to the price as a base. All lines are equidistant and are drawn from the first point of the linear regression to the most recent point of the linear regression plus the root-mean-square deviation (RMSD) multiplied by a certain factor.

  • Length: Lookback period for the linear regression .
  • Mult: Multiplier for the RMSD, allows returning wider fans.
  • Lines Per Side: Number of lines on each side of the fan.
  • Src: Input source of the indicator.


Traders often use the lines of fans to determine significant points of support or resistance at which they might expect price variations to reverse.

The length can be adjusted so that the starting point of the linear regression is located at a pivot high/low.

Some technical analysts use the measure rule of broadening wedges with fans when price breaks one of the extremities. This allows setting precise take-profits/stop-losses.

To learn more about the measure rule see:

Minor changes.

Get Access to LuxAlgo indicators:

Join our 100k+ community:

All scripts & content provided by LuxAlgo are for informational & educational purposes only. Past performance does not guarantee future results.

TradingViewの精神に則り、このスクリプトの作者は、トレーダーが理解し検証できるようにオープンソースで公開しています。作者に敬意を表します!無料で使用することができますが、このコードを投稿で再利用するには、ハウスルールに準拠する必要があります。 お気に入りに登録してチャート上でご利用頂けます。