Linear Regression MTF + Bands

GoodGains Uppdaterad   
  1. Multiple Time Frames (MTFs): The indicator allows you to view linear regression trends over three different time frames (TF1, TF2, TF3) simultaneously. This means a trader can observe short, medium, and long-term trends on a single chart, which is valuable for understanding overall market direction and making cross-timeframe comparisons.

  2. Linear Regression Bands: For each time frame, the indicator calculates linear regression bands. These bands represent the expected price range based on past prices. The middle line is the linear regression line, and the upper and lower lines are set at a specified deviation from this line. Traders can use these bands to spot potential overbought or oversold conditions, or to anticipate future price movements.

  3. History Bands: Looking at linear regression channels can be deceiving if the user does not understand the calculation. In order to see where the channel was at in history the user can display the history bands to see where price actual was in a non-repainting fashion.

  4. Customization Options: Traders can customize various aspects of the indicator, such as whether to display each time frame, the length of the linear regression (how many past data points it considers), and the deviation for the bands. This flexibility allows traders to adapt the indicator to their specific trading style and the asset they are analyzing.

  5. Alerts: The script includes functionality to set alerts based on the price crossing the upper or lower bands of any time frame. This feature helps traders to be notified of potential trading opportunities or risks without constantly monitoring the chart.


  • The 15minute linear regression is overlayed onto a 5 minute chart. We are able to see higher timeframe average and extremes. The average is the middle of the channel and the extremes are the outer edges of the bands. The bands are non-repainting meaning that is the actual value of the channel at that place in time.
  • Here multiple channels are shown at once. We have a linear regression for the 5, 15, and 60 minute charts. If your strategy uses those timeframes you can see the average and overbought/oversold areas without having to flip through charts.
    • In this example we show just the history bands. The bands could be thought of as a "don't diddle in the middle" area if your strategy is looking for reversals
      • You can extend the channel into the future via the various input settings.
- Update idea image
Skript med en öppen källkod

I sann TradingView-anda har författaren publicerat detta skript med öppen källkod så att andra handlare kan förstå och verifiera det. Hatten av för författaren! Du kan använda det gratis men återanvändning av den här koden i en publikation regleras av våra ordningsregler. Du kan ange den som favorit för att använda den i ett diagram.

Frånsägelse av ansvar

Informationen och publikationerna är inte avsedda att vara, och utgör inte heller finansiella, investerings-, handels- eller andra typer av råd eller rekommendationer som tillhandahålls eller stöds av TradingView. Läs mer i Användarvillkoren.

Vill du använda det här skriptet i ett diagram?