Lin Reg (Linear Regression) Support and Resistance by xxMargauxLin Reg (Linear Regression) Support & Resistance by xxMargaux 💸
This indicator plots three linear regression lines (Lin Reg) on the price chart, providing insights into potential support and resistance levels. It calculates Lin Reg lines based on user-defined lengths and sources.
This indicator's settings were initially configured for MNQ1! (E-Mini Nasdaq 100 futures contracts). But works as intended on any security and on any timeframe.
When price is below a given Lin Reg line, that line will be red and may serve as resistance as price moves up towards the line. That is, it may be a potential short entry opportunity. When price is above a given Lin Reg line, that line will be green and may serve as support as price continues up from the line. That is, it may be a potential long entry opportunity.
When price starts to break sideways or down through the Lin Reg lines, this may signal a reversal from uptrend to downtrend. When price starts to break sideways or up through the Lin Reg Lines, this may signal a reversal from downtrend to uptrend. In very strong trends, breaking through the lines briefly may provide an entry opportunity, but be cautious because a trend reversal may also be possible.
Inputs:
Length of Price Lin Reg Lines: Customize the lengths of the three Lin Reg lines.
Source for Price Lin Reg Lines: Choose the source for each Lin Reg line.
Source for Security Price: Select the price source for the security.
Features:
Trend Analysis: Assists in visualizing price trends based on the relationship between the security price and Lin Reg lines, which will be colored according to whether price is above or below each Lin Reg line.
Customizable Colors: When price is above a Lin Reg line that line will be green. When price is below a Lin Reg line, that line will be red.
Here's a beginner-friendly explanation of linear regression lines 💡
Best-Fit Line: Imagine you have a scatter plot of closing prices on a chart. Linear regression aims to find the straight line that best fits the overall trend of these data points. It's like drawing a line through the center of the data that minimizes the distance between the line and each data point.
Trend Identification: Once the linear regression line is plotted on a price chart, it provides a visual representation of the trend. If the price is generally rising, the linear regression line will slope upwards. If the price is falling, the line will slope downwards. This helps traders identify whether the trend is bullish (upward) or bearish (downward).
Support and Resistance: Linear regression lines can also act as dynamic support and resistance levels. When the price is above the linear regression line, it may act as support, meaning the price tends to bounce off the line and continue higher. Conversely, when the price is below the line, it may act as resistance, with the price encountering selling pressure and potentially reversing lower.
Reversal Signals: Changes in the slope or direction of the linear regression line can signal potential trend reversals. For example, if the price breaks above a downward-sloping linear regression line, it may indicate a shift from a downtrend to an uptrend, and vice versa.
Adjustable Parameters: Traders can customize the length of the linear regression line by adjusting the period over which it's calculated. Shorter periods may be more sensitive to recent price changes, while longer periods may provide a smoother trend line.
Linregslope
Natural Market Slope [CC]The Natural Market Slope was created by Jim Sloman and this is one of his many Ocean Indicators which I'm publishing thanks to receiving source materials from @altcoinz and @tmac87. I did completely rewrite the formula for this indicator but I commented out the original calculation so you can compare or just for study purposes. I like this version better because it is very smooth and the original formula is a bit faster with response but is very choppy in comparison.
This indicator was the basis for his Natural Market Combo which I will be publishing very soon so stay tuned for that. The idea behind all of his Natural indicators was to use the natural log of the current price in different ways. This indicator obviously focuses on the slope and it essentially becomes another momentum indicator which peaks when the upward momentum is gone and vice versa. Buy when the line turns green and sell when it turns red. I have added strong buy and sell signals in addition to the normal ones and strong signals are darker in color in comparison to the original lighter colors.
Let me know if there are any other indicators you would like to see me publish!
Linear Regression ++Due to public demand
Linear Regression Formula
Scraped Calculation With Alerts
Here is the Linear Regression Script For traders Who love rich features
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 line. The default is 1
++ Alerts On Channel/Range Crossing
Usage
++ Use this for BreakOuts and Reversals
++ This Script is not to be used Independently
Risks
Please note, this script is the likes of Bollinger bands and poses a risk of falling in a trend range.
Signals may Keep running on the same direction while the market is reversing.
Requests
If you have any feature requests, comment below or dm me. I will answer when i can.
Feel free to utilize this on your chart and share your ideas
For developers who want to use this on their chart, Please use this script
The original formula for calculation is posted there
❤❤❤ I hope you love this. From my heart! ❤❤❤
Lnear Regression ++Here is another amazing script for you guys
Target Audience
++ Programmers
++ Linear Regression Enthusiasts
Please Use this Indicator If you understand the risk posed by linear regression; ill explain some below
Features
++ Raw Formulae for the linear regression
--I understand that tradingview explanation on how the linreg function works is not clear to many of you and therefore i included this for developers
--Yes its much simpler than you thought, Do Enjoy
++ Alerts
--You can get alerts when the lower band is crossed/touched based on your settings
--These alerts are not repainting at all.
Linear Regression Limits
As you traders know, the market changes from time and new levels will get drawn
The alerts are based on these new levels and once we have new ones, we keep updating
Risk
This script is similar to Bollinger Bands style of alerts, If the market moves continuously to one direction after the break of a band, The levels change and you may receive a new signal confirmation
Cheers!! Enjoy!! Feel free to ask me for any improvements
Minkowski Distance Period Linear Regression BandsHello, this script was created by using Linear Regression Bands Function with variable Function Minkowski Distance Adaptive Period.
Function Linear Regression Bands :
Minkowski Distance Function Original Script by RicardoSantos :
Functions saved from overloads . And suitable for mutable variable periods.
Regards.
Function : Linear Regression Bands
Used with Pearson Correlation. It can be used to make sense of the trends. Very successful results can be obtained with a MACD style indicator and volume indicator that gives Buy and Sell orders.Open for adaptive and mutable variable periods of moving averages. Best regards!
Function for Least Squares Moving AverageThank you to alexgrover for putting me wide to this, after putting up with long conversations and stupid questions. Follow him and behold: www.tradingview.com
What is this?
This is simply the function for a Least Squares Moving Average. You can render this on the chart by using the linreg() function in Pine.
Personally I like to use the slope of the LSMA to help determine what direction to take a trade in, but I'm sure there are other, more exotic ways of using it and, if you know how to get your fingers dirty with Pine, you can create more exotic versions of it by modifying the function provided.
Want to learn?
If you'd like the opportunity to learn Pine but you have difficulty finding resources to guide you, take a look at this rudimentary list: docs.google.com
The list will be updated in the future as more people share the resources that have helped, or continue to help, them. Follow me on Twitter to keep up-to-date with the growing list of resources.
Suggestions or Questions?
Don't even kinda hesitate to forward them to me. My (metaphorical) door is always open.
ORDINARY LEAST SQUARES Slope by @XeL_ArjonaORDINARY LEAST SQUARES Slope by @XeL_Arjona
Ver. 1 by Ricardo M Arjona @XeL_Arjona
DISCLAIMER:
The Following indicator/code IS NOT intended to be a formal investment advice or recommendation by the author, nor should be construed as such. Users will be fully responsible by their use regarding their own trading vehicles/assets.
The embedded code and ideas within this work are FREELY AND PUBLICLY available on the Web for NON LUCRATIVE ACTIVITIES and must remain as is.
WHAT'S THIS?
This is a REAL mathematically approach of an ORDINARY LEAST SQUARES LINE FITTING SLOPE as TradingView currently don't have a native one embedded, neither as a pine function. Other "Sope" indicators from this linear regression model I found on public library are currently based on "momentum" rather tan slope.
Any modifications or additions are quite welcome!
Cheers!
@XeL_Arjona