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...
Multi-timeframe Strategy based on Logistic Regression algorithm
This strategy uses a classic machine learning algorithm that came from statistics - Logistic Regression (LR).
The first and most important thing about logistic regression is that it is not a 'Regression' but a 'Classification' algorithm. The name itself is somewhat misleading....
This is an experimental study designed to calculate polynomial regression for any order polynomial that TV is able to support.
This study aims to educate users on polynomial curve fitting, and the derivation process of Least Squares Moving Averages (LSMAs).
I also designed this study with the intent of showcasing some of the capabilities and potential applications...
Fit a quadratic polynomial (parabola) to the last length data points by minimizing the sum of squares between the data and the fitted results. The script can extrapolate the results in the future and can also display the R-squared of the model. Note that this script is subject to some limitations (more in the "Notes" section).
Length : Number of...
This script is a combination of different logarithmic regression fits on weekly BTC data. It is meant to be used only on the weekly timeframe and on the BLX chart for bitcoin. The "fair value" line is still subjective, as it is only a regression and does not take into account other metrics.
Introducing the Moving Regression Prediction Bands indicator.
Here I aimed to combine the principles of traditional band indicators (such as Bollinger Bands), regression channel and outlier detection methods. Its upper and lower bands define an interval in which the current price was expected to fall with a prescribed probability, as predicted by the...
Following the introduction of the Moving Regression Prediction Bands indicator (see link below), I'd like to propose how to utilize it in a simple band breakout strategy :
Go long after the candle closes above the upper band . The lower band (alternatively, the lower band minus the 14-period ATR or the central line ) will serve as a support line .
This is my first public release of indicator code and my PSv4.0 version of "Linear Regression Channel", as it is more commonly known. It replicates TV's built-in "Linear Regression" without the distraction of heavy red/blue fill bleeding into other indicators. We can't fill() line.new() at this time in Pine Script anyways. I entitled it Linear Regression Trend...
A function that returns a polynomial regression and deviation information for a data set.
_X: Array containing x data points.
_Y: Array containing y data points.
_predictions: Array with adjusted _Y values.
_max_dev: Max deviation from the mean.
_min_dev: Min deviation from the mean.
Return a linear regression channel with a window size within the range (min, max) such that the R-squared is maximized, this allows a better estimate of an underlying linear trend, a better detection of significant historical supports and resistance points, and avoid finding a good window size manually.
Min : Minimum window size value
Moving 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.
Moving Regression allows one to smooth...
A Function that returns a linear regression channel using (X,Y) vector points.
_X: Array containing x data points.¹
_Y: Array containing y data points.¹
¹: _X and _Y size must match.
_predictions: Array with adjusted _Y values at _X.
_max_dev: Max deviation from the mean.
This indicator was originally developed by Paul Kirshenbaum, a mathematician with a Ph.D. in economics from New York University.
It uses the standard error of linear regression lines of the closing price to determine band width. This has the effect of measuring volatility around the current trend, rather than measuring volatility for changes in trend.
**DESIGNED FOR ES/MES** This script provides an easy visualization of potential reversion zones to take trades back to the intraday midline. A common use would be to enter a position once price reached the outer yellow zones and retreats to either the red zone (for a short toward the midline) or a green zone (for a long back to the midline).
draws a line from 2 vectors(price, time)
reformatted the function,
added automatic detection of the period multiplier by approximation(gets a bit goofy with stocks/week time),
example using timestamp() function.
offsetting is still bugged, i cant find a way around it atm.
**DESIGNED FOR NQ/MNQ** This script provides an easy visualization of potential reversion zones to take trades back to the intraday midline. A common use would be to enter a position once price reached the outer yellow zones and retreats to either the red zone (for a short toward the midline) or a green zone (for a long back to the midline).
Due to public demand
Linear Regression Formula
Scraped Calculation With Alerts
Here is the Linear Regression Script For traders Who love rich features
++ Multi time frame -> Source Regression from a different Chart
++ Customized Colors -> This includes the pine lines
++ Smoothing -> Allow Filtered Regression; Note: Using 1 Defaults to the original...
This is an experimental study which calculates a linear regression channel over a specified period or interval using custom moving average types for its calculations.
Linear regression is a linear approach to modeling the relationship between a dependent variable and one or more independent variables.
In linear regression, the relationships are modeled using...