Forecast OscillatorThe Forecast Oscillator is a technical indicator that compares a security close price to its time series forecast. The time series forecast function name is "tsf" and it calculates the projection of the price trend for the next bar.
The Forecast Oscillator and therefore the time series forecast are based on linear regression. The time series forecast indicator is equal to the sum of two other indicators: the linear regression (LinearReg) and the linear regression slope (LinearReg_Slope).
If the Forecast Oscillator stays above the zero line for an extended period, then it signals that the price may rise in the future and if it stays below the zero line for an extended period, then it signals a coming fall in the security price.
The indicator name is "Forecast Oscillator" and it accepts two arguments. The first argument is the time series that is used in the next bar forecast (It is usually the close price) and the second one is the period that will be passed to the time series forecast function during calculation . The technical analysis indicator returns a value in percentage that corresponds to the close price minus the previous value of the time series forecast, multiplied by 100 and divided by the close price.
Author's Note:
Just look at the exaggerated movements of the oscillator especially in trend changes . Some examples can be experienced on the chart in rectangles.
Kıvanç Özbilgiç
Regressão Linear
Volume-Supported Linear Regression TrendHello Traders,
Linear Regression gives us some abilities to calculate the trend and if we combine it with volume then we may get very good results. Because if there is no volume support at up/downtrends then the trend may have a reversal soon. we also need to check the trend in different periods. With all this info, I developed Volume-Supported Linear Regression Trend script. The script checks linear regression of price and volume and then calculates trend direction and strength.
You have option to set Source, Short-Term Period and Long-Term Period. you can set them as you wish.
By default:
Close is used as "Source"
Short-Term Period is 20
Long-Term Period is 50
in following screenshot I tried to explain short term trend (for uptrend). Volume supports the trend? any volume pressure on trend? possible reversal? same idea while there is downtrend.
in following screenshot I tried to explain long term trend:
You can also check Positive/Negative Divergences to figure out possible reversals (to automate it, you can use Divergence for Many Indicators v4 , it has ability to check divergences on external indicators)
Enjoy!
Theil–Sen EstimatorThe Theil-Sen estimator is a nonparametric statistics method for robustly fitting a regression line to sample points (1,2).
As stated in the Wikipedia article (3), the method is " the most popular nonparametric technique for estimating a linear trend " in the applied sciences due to its robustness to outliers and limited assumptions regarding measurement errors.
Relation with other Methods
The Theil-Sen estimator can be significantly more accurate than simple linear regression (least squares) for skewed and heteroskedastic data.
Method Description
The script computes all the slopes between pairs of points and takes the median as the estimate of the regression slope, m . Subsequently, the intercept, b , is determined from the sample points as the median of y(i) − m x(i) values. The regression line in the slope–intercept form, y = m x + b , is then plotted along with the calculated prediction interval (estimated by means of the root-mean-square error).
I have added two options for how to handle pairs of points:
Method == "All" to use the slopes of all pairs of points;
Method == "Random" to use the slopes of randomly generated pairs of points.
The random choice of the pairs of points is based on the Wichmann–Hill is a pseudorandom number generator.
The reason for introducing the "Random" method is that the calculation of the median involves sorting the array of slopes (the size of N*(N-1)/2, where N is the number of sample points). This is a computationally demanding procedure, which runs into the limit on the cycle computation time (200 ms) set in TradingView. Therefore, the "All" method works only with Length < 50.
Also note that the number of lookback points is limited by by the maximum array size allowed in TradingView.
Literature
1. Sen, P. K. (1968) "Estimates of the regression coefficient based on Kendall's tau." JASA, 1379-1389.
2. Theil, H. (1950) "A rank-invariant method of linear and polynomial regression analysis." Reprinted in 1992 in Henri Theil’s contributions to economics and econometrics, Springer, 345-381.
3. en.wikipedia.org
TopTenAlgo 7. Linear Trend Tracking (Without Volume & Coloring)EN:
Dogrusal Trend Takipcisi is used in conjunction with Gosterge Trend. Both indicators are for approval of each other. While the Indicator looks at Logarithmic to prices, It looks at Linear. Although its mathematical function is stuck between two trend lines like Gösterge Trend, the Dogrusal Trend Takipcisi can also be used as the main histogram, the absolute value of the difference between the trend and the down trend line .
If the uptrend line is larger than the downtrend, histogram bars are light green or dark green areas. When the bullish trend line now crosses the down trend line , the bar is dark green. When the up trend line is larger than the down trend line and the up trend line increases, the bars also become dark green. This tendency starts to keep getting stronger. If the bullish trend line is larger than the bearish trend line but decreases, the bars are light green. This is when the bullish trend loses strength, So, Uptrend is weakening.
If the downtrend line is larger than the bullish trend line , a negative occur, and the bars become red or light red. If the bearish trend line has exceeded the bullish trend line or the value is increasing, the bar is in red. If the bearish trend line is larger than the bullish trend line but the value is decreasing, the bars are light red. This comes when the downward trend is losing power. So, Downtrend is weakening. For symbols for which the Volume Indicator cannot be read.
This algorithm is prepared with @Top10Algo ...
TR: Doğrusal Trend Takipçisi Gösterge Trendle ile beraber kullanılır. Her iki göstergede birbirinin onayını almak içindir. Gösterge Trend fiyatlara logaritmik bakarken, Doğrusal Tren Takipçisi Linear bakar. Matematiksel fonsiyonu Gösterge Trend gibi iki trend çizgisi arasına sıkışmış olsada Doğrusal Trend Takipçisi ayrıca ana histogram olarak gösterilen yukarı trend ve aşağı trend çizgisi arasındaki farkın mutlak değerini linear olarak hesaplayarak momentumun gücünü ölçer ve size zayıflayan trendleri haber eder.gösterir.
Yukarı trend çizgisi aşağı trendden büyükse (bu nedenle pozitif hareketi gösterir), histogram çubukları açık yeşil veya koyu yeşil olacaktır. Artış trendi çizgisi şimdi aşağı trend çizgisini geçtiğinde, çubuk koyu yeşil olacaktır. Yukarı trend çizgisi aşağı trend çizgisinden daha büyük olduğunda ve yukarı trend çizgisi arttığında çubuklar da koyu yeşil olur. Bu eğilimin güçlenmeye devam ettiği anlamına geliyor. Yükseliş trendi çizgisi düşüş trendi çizgisinden büyükse ancak azalıyorsa, çubuklar açık yeşil olacaktır. Bu yükseliş eğiliminin güç kaybettiği anlamına gelir.Yani yükseliş trendi zayıflıyordur.
Düşüş trendi çizgisi yükseliş trendi çizgisinden büyükse, olumsuz bir eğilim oluşur ve çubuklar kırmızı veya açık kırmızı olur. Düşüş trendi çizgisi yükseliş trendi çizgisini aştıysa veya değer artıyorsa, çubuk kırmızı olacaktır. Düşüş trendi çizgisi yükseliş trendi çizgisinden büyükse, ancak değer azalıyorsa, çubuklar açık kırmızı olacaktır. Bu düşüş eğiliminin güç kaybettiği anlamına gelir. Yani düşüş trendi zayıflıyordur. Hacim Göstergesinin okunamadığı semboller içindir.
Bu algoritma @Top10Algo ile beraber hazırlanmıştır...
Logarithmic regressionLogarithmic regression (or known as Tseng's tunnels), is used to model data where growth or decay accelerates rapidly at first and then slows over time.
This model is for the long term series data (such as 10 years time span).
The user can consider entering the market when the price below 25% or 5% confidence and consider take profit when the price goes above 75% or 95% confidence line.
Technical issues
*The user have to pan over the chart from the beginning to the end of the study range (such as 10 years of bars) so the pine script could generate those regression lines on the chart.
*If on the chart the number of bar is less than the lookback period, it won't generate any lines as well
TopTenAlgo 7. Linear Trend Tracking (Include Volume & Coloring)EN:
Dogrusal Trend Takipcisi is used in conjunction with Gosterge Trend. Both indicators are for approval of each other. While the Indicator looks at Logarithmic to prices, It looks at Linear. Although its mathematical function is stuck between two trend lines like Gösterge Trend, the Dogrusal Trend Takipcisi can also be used as the main histogram, the absolute value of the difference between the trend and the down trend line .
If the uptrend line is larger than the downtrend, histogram bars are light green or dark green areas. When the bullish trend line now crosses the down trend line , the bar is dark green. When the up trend line is larger than the down trend line and the up trend line increases, the bars also become dark green. This tendency starts to keep getting stronger. If the bullish trend line is larger than the bearish trend line but decreases, the bars are light green. This is when the bullish trend loses strength, So, Uptrend is weakening.
If the downtrend line is larger than the bullish trend line , a negative occur, and the bars become red or light red. If the bearish trend line has exceeded the bullish trend line or the value is increasing, the bar is in red. If the bearish trend line is larger than the bullish trend line but the value is decreasing, the bars are light red. This comes when the downward trend is losing power. So, Downtrend is weakening.
This algorithm is prepared with @Top10Algo ...
TR: Doğrusal Trend Takipçisi Gösterge Trendle ile beraber kullanılır. Her iki göstergede birbirinin onayını almak içindir. Gösterge Trend fiyatlara logaritmik bakarken, Doğrusal Tren Takipçisi Linear bakar. Matematiksel fonsiyonu Gösterge Trend gibi iki trend çizgisi arasına sıkışmış olsada Doğrusal Trend Takipçisi ayrıca ana histogram olarak gösterilen yukarı trend ve aşağı trend çizgisi arasındaki farkın mutlak değerini linear olarak hesaplayarak momentumun gücünü ölçer ve size zayıflayan trendleri haber eder.gösterir.
Yukarı trend çizgisi aşağı trendden büyükse (bu nedenle pozitif hareketi gösterir), histogram çubukları açık yeşil veya koyu yeşil olacaktır. Artış trendi çizgisi şimdi aşağı trend çizgisini geçtiğinde, çubuk koyu yeşil olacaktır. Yukarı trend çizgisi aşağı trend çizgisinden daha büyük olduğunda ve yukarı trend çizgisi arttığında çubuklar da koyu yeşil olur. Bu eğilimin güçlenmeye devam ettiği anlamına geliyor. Yükseliş trendi çizgisi düşüş trendi çizgisinden büyükse ancak azalıyorsa, çubuklar açık yeşil olacaktır. Bu yükseliş eğiliminin güç kaybettiği anlamına gelir.Yani yükseliş trendi zayıflıyordur.
Düşüş trendi çizgisi yükseliş trendi çizgisinden büyükse, olumsuz bir eğilim oluşur ve çubuklar kırmızı veya açık kırmızı olur. Düşüş trendi çizgisi yükseliş trendi çizgisini aştıysa veya değer artıyorsa, çubuk kırmızı olacaktır. Düşüş trendi çizgisi yükseliş trendi çizgisinden büyükse, ancak değer azalıyorsa, çubuklar açık kırmızı olacaktır. Bu düşüş eğiliminin güç kaybettiği anlamına gelir. Yani düşüş trendi zayıflıyordur.
Bu algoritma @Top10Algo ile beraber hazırlanmıştır...
Exponential Regression Slope Annualized with R-squared HistogramMy other indicator shows the linear regression slope of the source. This one finds the exponential regression slope and optionally multiplies it by R-squared and optionally annualizes it. Multiplying by R-squared makes sure that the price movement was significant in order to avoid volatile movements that can throw off the slope value. Annualizing the exponential slope will let you see how much percentage you will make in a year if the price continues at its current pace.
The annualized number is the number of trading days in a year. This and the length might need adjusting for the extra bars that might be in futures or other markets. The number does not have to be a year. For example, it can be a month if you set the number to 20 or so trading days to find how much you would make in a month if price continues at its current pace, etc. This can also be used as an alternative to relative strength or rate of change.
Moving RegressionMoving Regression is a generalization of moving average and polynomial regression.
The procedure approximates a specified number of prior data points with a polynomial function of a user-defined degree. Then, polynomial interpolation of the last data point is used to construct a Moving Regression time series.
Application:
Moving Regression allows one to smooth noise on the analyzed chart, assess momentum, confirm trends, and establish areas of support and resistance.
In addition, it can be used as a simple stand-alone forecasting method to identify trend direction and trend reversal points. When the local polynomial is predicted to move up in the next time step, the color of the Moving Regression curve will be green. Otherwise, the color of the curve is red. This function is (de)activated using the Predict Trend Direction flag.
Selecting the model parameters:
The effects of the moving window Length and the Local Polynomial Degree are confounded. This allows for finding the optimal trade-off between noise (variance) and lag (bias). Higher Length and lower Polynomial Degree (such as 1, i.e. linear), will result in "smoother" time series but at the cost of greater lag. Increasing the Polynomial Degree to, for example, 2 (squared) while maintaining the Length will diminish the lag and thus compromise the noise-lag tradeoff.
Relation to other methods:
When the degree of the local polynomial is set to 0 (i.e., fitting data to a constant level), the Moving Regression time series exactly matches the Simple Moving Average of the same length.
Linear Regression - Reverse Up/Down StrategyFor my first foray into pine script I took the code from the generic "Consecutive up/down" and flipped the logic. I added a linear regression filter to try and stay with the overall trend. ATR added for visual, I eventually want to use it as part of the money management.
Rules to open trade or close the opposite:
IF the linear regression slope is >=0 AND the last candle closes lower, BUY
IF the linear regression slope is <=0 AND the last candle closes higher SELL
Rules to close the opposite:
IF the linear regression slope is >=0 AND the last candle closes higher, close any open SELL
IF the linear regression slope is <=0 AND the last candle closes lower, close any open BUY
Pearsons R historic breaks ( for making strategy out of it )Pearsons R adjustments of linear regressions is a good tool to analyse visually the trend basis channeling of the market,
one of the common challenges in the scripts which i came across the tradingview community is the lack of the historic places put over the charts where the price actually crossed up/below the channel boundaries,
For me in order to do so we would have to replay the scripts over and over.
So I came up with an addon extension to a good script on the community ()
I have added the historic marks over the charts ( blue/green/red/orange Arrows which you see on the charts)
These arrows are the places where the price have crossed the channel boundaries historically
So,
Blue arrow = Bull Intent ,Place where the upper channel boundary line have been crossed
Orange arrow = Bear Intent , Place where the Lower channel boundary line have been crossed
Green arrow = Bull Max , Place where the Maximum Upper channel boundary line have been crossed
Red arrow = Bear Max , Place where the Minimum Lower channel boundary line have been crossed
For me this type of approach is good for making a strategy out of the concepts visually, in congestion to other indicators
I would suggest you guys to check this on alert basis with your setups to derive out the best from linear regressions
Lastly it would be a pleasure to give credits to the creators of Pearsons R scripts in Tradingview
@midtownsk8rguy
@TradeBoneDogs
@x11joe
Also thanking Tradingview for providing us such an awesome community and platform :)
alGROWithm PremiumIntroducing the alGROWithm indicator!
Years of trading experience and endless hours of screen time has undeniably proven to me that the most fundamental rule of any market is: price moves from supply to supply and demand to demand. Specifically, this means that a breakout of a supply zone , the probability of it reaching the next supply zone before starting consolidate is very high. Similarly, a breakdown from previous demand zone will likely continue to the next demand zone . The identification method of these supply and demand channels is one of the features that sets this indicator apart from other available tools.
What separates alGROWithm from other available tools?
- Proprietary method for identifying supply & demand channels combined with a directional bias computation based on recent historical prices
- Only signaling precise entries based on supply & demand that maximize R/R
- Tracking open positions and displaying a trading plan directly on the chart immediately after signaling entry points
- Indicating precise exit levels to help you avoid exiting too early or trading by emotion
What are the features included in alGROWithm?
Trading Plan Lines : These are the Buy/Short/Take Profit/Exit lines plotted directly on the chart
Show Long Signals : These are the green "BUY" labels that appear on the chart when alGROWithm identifies a critical breakout to the next supply level
Show Short Signals : These are the red "SHORT" labels that appear on the chart when alGROWithm identifies a critical breakdown to the next demand level
Show Take Profit Signals : These are the purple "TP" labels that appear on the chart when alGROWithm identifies that the subsequent supply/ demand level has been hit
Show Exit/Stop Loss Signals : These are the purple "EXIT" labels that appear on the chart when alGROWithm identifies that the trade has run its course and it's time to exit
Show Dashboard : This is a dashboard that is displayed to the right of the latest candle, and contains the following information:
- Current Position : "Long", "Short", or "None"
- Next Profit Target : Only displays if there is an active Position
- Current Bias : alGROWithm computes a directional bias based on recent historical prices. Text will say "Long" or "Short"
- Long/Short Bias Until : alGROWithm's bias will change if this price is hit. Note that these are not BUY or SELL levels - this simply indicates whether things are looking up or down
- Enter Short/Long At : Only displays if Current Position = "None"
Note that you can enable/disable any of these chart overlays at anytime through the indicator settings.
The alGROWithm indicator works on any timeframe, any market, and standard OR Heikin Ashi candlesticks .
I have been working very hard on this indicator and I personally use it on a daily basis with options trading. I am so excited to share the wealth with you!
You can use the link below to visit our website and gain access to the script.
Daily Play Ace SpectrumSo the idea of the Daily Play Ace Spectrum is to extend the Ace Spectrum .
By exposing more parameters, making a variation of the Ace Spectrum which is more configurable.
The idea is this makes the Daily Play Ace Spectrum more suitable for use on shorter (hourly and minute) time scales.
These specific parameters exposed still maintain the original form of the original Ace Spectrum, but loosen up the hard coded assumptions of the original indicator.
By exposing more parameters this now makes the Daily Ace Spectrum more sensitive to input.
Meaning the parameters you choose are important and will set the characteristic reaction of the indicator to the series you give it.
This presents a trade-off, the simplicity of the original indicator is sacrificed.
But what's gained is a more comprehensive indicator that now needs more careful parameter adjustment .
Related to the Ace Spectrum:
Linear Regression ChannelHello Traders,
There are several nice Linear Regression Channel scripts in the Public Library. and I tried to make one with some extra features too. This one can check if the Price breaks the channel and it shows where is was broken. Also it checks the momentum of the channel and shows it's increasing/decreasing/equal in a label, shape of the label also changes. The line colors change according to direction.
using the options, you can;
- Set the Source (Close, HL2 etc)
- Set the Channel length
- Set Deviation
- Change Up/Down Line colors
- Show/hide broken channels
- Change line width
meaning of arrows:
⇑ : Uptrend and moment incresing
⇗ : Uptrend and moment decreasing
⇓ : Downtrend and moment incresing
⇘ : Downtrend and moment decreasing
⇒ : No trend
An example for how color of lines, arrow direction and shape of label change.
Enjoy!
Tech Primary AnalysisThe indicator consists of four main parts, the main SR/Rejection the solid black line, the Second SR, Trend channels the dashed line , and Alerts.
The Main SR/ Rejection point is used to indicate a rejection of a candlestick .
This first type of rejection is identified by a default black line to represent a low zone in the market for that trade.
The Second SR shows a pivot point on the chart; it is presented as a dotted line often near the main SR/Rejection.
When a rejection and pivot point are near each other, it indicates a strong zone.
Trend channels are moving averages, they also have 2 standard deviations that instruct you on when it is best to buy into a trade and when it is best to sell and leave the trade.
You buy low and sell higher for the maximum profit. Lastly, there are alerts;
set an alert for the main rejection line when you want to follow the trend channel, or use it for the when the second resistance is broken, or when the support is broken.
Another important technique is knowing when to trade.
Trading is best in intervals of four hours. Trading at 9am, 1pm, 5pm, 9pm, and 1am will get you into the beginning of the trade to better watch the trend channels.
Another important factor to remember is setting the stop loss which should be a previous rejection
Works on all markets : Forex, Crypto, Options Stocks
Use the link below to obtain access to this indicator or PM us to obtain access
RG+B [Intromoto]Hey folks.
This is an experimental guppy formed from regression lines, instead of the normal EMAs. There are 8 regression plots in total, starting from 25, and progressing in increments of 25, ending in 200.
I've added a bias color in the background to assist in trend directions for when price is above all regression lines or below all regression lines.
Please DM me for trial/access.
Thanks.
Linear Regression Slope HistogramThis is the slope of linear regression plotted as a histogram. It has a threshold for the slope in case there is a minimum slope amount that the user wants for it to show green or red. The color shows a dim and bright effect depending on the direction of the slope to better show its rise and fall. You can set the length of the slope in the input setting screen.
Some interesting things about linear regression slope that I found out: It kind of looks like the histogram of ADX or the directional movement lines depending on the length used for the slope. According to Tushar Chande, linear regression can be used as an alternative of finding trend direction, although it is hard to say what length to use for it, I haven't been able to figure out a good way to apply it yet. According to Bulkowski, linear regression of the volume can be used with certain chart patterns that he listed to increase their chance of success by taking trades where the linear regression line points towards, so if you use volume as a source on this indicator you can take trades in whatever said direction. Got any other ideas on how to use linear regression? Feel free to let me knows, would gladly appreciate it.
Variable Linear Regression With Pearsons R OscillatorThis is the Oscillator that is meant to go with the Variable Linear Regression With Pearsons R Script. Set this to match the settings you have on the other script.
To use this, you want to do trades something like this:
The bottom -0.80 (green line) means that the trend is very strong in the upward direction. This almost always means it's about to finish its trend soon and reverse the other direction. If you see the other linear regression lines also coincide with this result it would best to get ready to reverse your position and do a short once some other indicators show you it is turning the other direction in addition to this.
The reverse for longing would be the case after a large downtrend and the 0.80 line (red line) is touched by many of the linear regressions, usually it means the downtrend is ending and there is a good buy opportunity soon.
This is called a variable linear regression systems because you can set as many variable linear regressions as you want. I have capped it at 10 but you can modify the code to raise this if really necessary. Every color is customizable for each different linear regression trend.
Variable Linear Regression With Pearsons RThis script allows you to set a variable number of linear regressions with alternating colors you can select. It will have a partner oscillator script shortly so you can see how the different trends change and interact with each other over time.
The script is currently very slow if you set the period for the linear regression too high. I recommend not going past 100. Works very well on the high time frames for this reason.
Anyone that knows of a faster way to run these calculations please let me know!
Donchian BlasterRelease Note:
Keeping in mind of getting full potential of Donchian Channels, As part of this script, Linear Regression is used as primary source to identify trend and execute the trades.
Hull Moving Average given as alternative option in place of Linear regression.
Linear Regression:
Linear regression used to identify trend, trade setup, and stop. Based on this, Color fillings on Donchian channels is updated. That will give clear idea of strength or weakness in any trading instruments.
HMA:
HMA used as alternative to identify trend, trade setup, and stop. Based on this, Color fillings on Donchian channels is updated. That will give clear idea of strength or weakness in any trading instruments.
Donchian Channels:
As it is one of the oldest trend riding system, combined here with differentiation in color will help to go with the trend.
Inputs:
Input periods can be changed by users/traders as per their understanding and observations.
//Disclaimer: Idea of publishing this script is to identify the strength of the instrument using multiple confirmation.
//Disclaimer: Using this indicator, changing inputs, and trading decisions are up to the users/traders.
//Courtesy: Thanks to Richard Donchian, Alan Hull, and author of LSMA as this indicator/script inspired by Donchian Channels, Hull Moving Average, and LSMA
Auto Linear Regression ChannelA Linear Regression Channel gives more objective potential buy and sell signals based on price volatility. It consists of three parts:
Linear Regression Line: A Linear Regression Line is a straight line that best fits the prices between a starting price point and an ending price point. A "best fit" means that a line is constructed where there is the least amount of space between the price points and the actual Linear Regression Line. The Linear Regression Line is mainly used to determine trend direction.
Traders usually view the Linear Regression Line as the fair value price for the stocks. When prices deviate above or below, traders may expect prices to go back towards the Linear Regression Line. As a consequence, when prices are below the Linear Regression Line, this could be viewed by some traders as a good time to buy, and when prices are above the Linear Regression Line, a trader might sell. Of course other technical indicators would be used to confirm these inexact buy and sell signals.
Upper Channel Line: A line that runs parallel to the Linear Regression Line and is usually one to two standard deviations above the Linear Regression Line.
Lower Channel Line: This line runs parallel to the Linear Regression Line and is usually one to two standard deviations below the Linear Regression Line.
The upper and lower channel lines contain between themselves either 68% of all prices (if 1 standard deviation is used) or 95% of all prices (if 2 standard deviations are used). When prices break outside of the channels, either: Buy or sell opportunities are present. Or the prior trend could be ending.
Linear Regression Channel Possible Buy Signal
When price falls below the lower channel line, and a trader expects a continuation of the trend, then a trader might consider it as a buy signal.
Linear Regression Channel Possible Sell Signal
An opportunity for selling might occur when prices break above the upper channel line, but a continuation of the trend is expected by the trader. Other confirmation signs like prices closing back inside the linear regression channel might be used to initiate potential buy or sell orders. Also, other technical indicators might be used to confirm.
Trend Reversals
When price closes outside of the Linear Regression Channel for long periods of time, this is often interpreted as an early signal that the past price trend may be breaking and a significant reversal might be near. Linear Regression Channels are quite useful technical analysis charting tools. In addition to identifying trends and trend direction, the use of standard deviation gives traders ideas as to when prices are becoming overbought or oversold relative to the long term trend.
Default Parameters:
Period: (100) The number of bars to use in the calculation.
This Linear Regression Channel Has 1st, 2nd, and 3rd Deviation lines also the MId Deviation Lines are added for 1.5 and 2.5 area.
Linear Regression (Log Scale)This code is a slightly modified version of Tradingviews' built-in "linear regression" script which can be correctly plotted on logarithmic charts.