TradingView
LuxAlgo
11 oct. 2021 15:51

Linear Regression Fan [LuxAlgo] 

Bitcoin / United States DollarCoinbase

Description

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.

Settings
  • 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.


Usage

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:

Notes de version

Minor changes.

Notes de version

Switched to version 5 and made calculation of the indicator based on the user-selected anchor points, thus preventing repainting.
Commentaires
Pratik_4Clover
Lovely idea, thanks!!
alexgrover
@Pratik_4Clover, Thanks a lot for your continuous support :D
dalld700
Lux Algo should put ALL their efforts into making their main indicator better, rather than bother with these useless side indicators.
SellingStrikes
@dalld700, useless to you gold to me
peacefulLizard50262
Amazing!
fcerit12
Bütün indikatorleriniz çok değerli
sandeep0935
Nice
ncjones30
I absolutely love this indicator. You guys are geniuses.
ncjones30
This is awesome.
xxattaxx-DisDev
Fantastic script!

Can you clarify line 29?

array.from(0.236,0.382,0.5,0.618,0.786,1.)

What variable is this array being assigned to and/or where is it being called?
Plus