MACandles-LinearRegression-StrategyThis is combination of multiple indicators and strategies. Mainly useful for indexes and to time the entry and exits of indexes. No stoploss used - makes it less desirable for leveraged trades or trading individual stocks.
Let us rewind and look back at some of the indicators/strategies published earlier.
1. Moving Average Candles - this is one of my favourite tool for general trend filtering. Applying supertrend on moving average candles is one of the easiest ways to find reversal in trending market without exiting positions too early. Few scripts published on this basis are:
MA Candles Supertrend
MA Candles Supertrend Strategy
2. VixFix and Linear Regression - this itself is combination of two indicators.
Williams-Vix-Fix-Finds-Market-Bottoms - by @ChrisMoody
Squeeze-Momentum-Indicator - by @LazyBear
I have combined these two indicators to derive VIX-Fix linear regression to find absolute market bottoms. More description here:
VixFixLinReg-Strategy
VixFixLinReg-Indicator
Now, in this strategy, we combine all these together.
Derive moving average candles
Derive momentum of moving average candles
Derive Linear regression on momentum
Optionally, also calculate VIX Fix and Linear regression on VixFix momentum
To find market bottom:
There are two options
1. Use when momentum of MA candles hit bottom (red) and slowly turn up (orange). In aggressiveLong mode, signals are also generated when momentum starts going positive from negative.
2. Use Vix Fix linear regression of MA candles as described in the original script of VixFixLinReg-Strategy
To find market top
Here only Ma candles momentum decreasing is used as signal. If looking for longTrades , exit signal is generated only when momentum is turning negative extreme(orange). Or else, exit signal is generated when momentum has turned neutral.
At this stage, it is very much experimental - use it with caution :)
Regressione lineare
KINSKI Volume Regression TrendRegression trends are typically used to determine when a price is unusually far from its baseline. The script calculates the linear regression of volume and price to determine the trend direction and strength. This can be used to determine the volume support for upward/downward trends.
As a special feature, this indicator allows you to choose from three (as of 07/20/2021) templates with special presets.
The following templates are available:
"Precise" (Period: 4, Smoothing Factor Type: "DISABLED", Smoothing Factor Length = 1).
"Smooth" (Period: 4, Smoothing Factor Type: "RMA", Smoothing Factor Length = 2)
"Long Term (Period: 20, Smoothing Factor Type: "DISABLED", Smoothing Factor Length = 1)
In the selection for templates, the option "DISABLED" can also be selected. Then the user-defined settings selectable under it take effect. There are the following setting options.
"Length": Adjustable period
"Smoothing Factor: Type": Type of moving average
"Smoothing Factor: Length": Adjustable period
Other setting options are:
Color codes: The color codes are explained in the settings
Display types: "Columns", "Histogram", "Area", "Line", "Stepline"
DAYOFWEEK performance1 -Objective
"What is the ''best'' day to trade .. Monday, Tuesday...."
This script aims to determine if there are different results depending on the day of the week.
The way it works is by dividing data by day of the week (Monday, Tuesday, Wednesday ... ) and perform calculations for each day of the week.
1 - Objective
2 - Features
3 - How to use (Examples)
4 - Inputs
5 - Limitations
6 - Notes
7 - Final Tooughs
2 - Features
AVG OPEN-CLOSE
Calculate de Percentage change from day open to close
Green % (O-C)
Percentage of days green (open to close)
Average Change
Absolute day change (O-C)
AVG PrevD. Close-Close
Percentage change from the previous day close to the day of the week close
(Example: Monday (C-C) = Friday Close to Monday close
Tuesday (C-C) = Monday C. to Tuesday C.
Green % (C1-C)
Percentage of days green (open to close)
AVG Volume
Day of the week Average Volume
Notes:
*Mon(Nº) - Nº = Number days is currently calculated
Example: Monday (12) calculation based on the last 12 Mondays. Note: Discrepancies in numbers example Monday (12) - Friday (11) depend on the initial/end date or the market was closed (Holidays).
3 - How to use (Examples)
For the following example, NASDAQ:AAPL from 1 Jan 21 to 1 Jul 21 the results are following.
The highest probability of a Close being higher than the Open is Monday with 52.17 % and the Lowest Tuesday with 38.46 %. Meaning that there's a higher chance (for NASDAQ:AAPL ) of closing at a higher value on Monday while the highest chance of closing is lower is Tuesday. With an average gain on Tuesday of 0.21%
Long - The best day to buy (long) at open (on average) is Monday with a 52.2% probability of closing higher
Short - The best day to sell (short) at open (on average) is Tuesday with a 38.5% probability of closing higher (better chance of closing lower)
Since the values change from ticker to ticker, there is a substantial change in the percentages and days of the week. For example let's compare the previous example ( NASDAQ:AAPL ) to NYSE:GM (same settings)
For the same period, there is a substantial difference where there is a 62.5% probability Friday to close higher than the open, while Tuesday there is only a 28% probability.
With an average gain of 0.59% on Friday and an average loss of -0.34%
Also, the size of the table (number of days ) depends if the ticker is traded or not on that day as an example COINBASE:BTCUSD
4 - Inputs
DATE RANGE
Initial Date - Date from which the script will start the calculation.
End Date - Date to which the script will calculate.
TABLE SETTINGS
Text Color - Color of the displayed text
Cell Color - Background color of table cells
Header Color - Color of the column and row names
Table Location - Change the position where the table is located.
Table Size - Changes text size and by consequence the size of the table
5 - LIMITATIONS
The code determines average values based on the stored data, therefore, the range (Initial data) is limited to the first bar time.
As a consequence the lower the timeframe the shorter the initial date can be and fewer weeks can be calculated. To warn about this limitation there's a warning text that appears in case the initial date exceeds the bar limit.
Example with initial date 1 Jan 2021 and end date 18 Jul 2021 in 5m and 10 m timeframe:
6 - Notes and Disclosers
The script can be moved around to a new pane if need. -> Object Tree > Right Click Script > Move To > New pane
The code has not been tested in higher subscriptions tiers that allow for more bars and as a consequence more data, but as far I can tell, it should work without problems and should be in fact better at lower timeframes since it allows more weeks.
The values displayed represent previous data and at no point is guaranteed future values
7 - Final Tooughs
This script was quite fun to work on since it analysis behavioral patterns (since from an abstract point a Tuesday is no different than a Thursday), but after analyzing multiple tickers there are some days that tend to close higher than the open.
PS: If you find any mistake ex: code/misspelling please comment.
Support and ResistanceThis indicator shows three types of support and resistance lines: Horizontal, Parallel (using linear regression) and Fibonacci Retracement. Lines can be adjusted or turned on and off in settings. A great tool for setting up entries, exits and locating pivot points.
Martyv Auto Fib Extension with Logarithmic SupportSimilar to the Auto Fib Retracement tool - I took the out-of-the-box functionality and added Logarithmic support, as well as nicer colors and easier management of levels. I'm... 90% sure I got the Fib calculations correct. If you see something, say something! Would love any suggestions for improvement.
Grid Bot AutoThis script is an auto-adjusting grid bot simulator. This is an improved version of the original Grid Bot Simulator. The grid bot is best used for ranging/choppy markets. Prices are divided into grids, or trade zones, that will trigger signals each time a new zone is entered. During ranging markets, each transaction is followed by a “take profit.” As the market starts to trend, transactions are stacked (compare to DCA ), until the market consolidates. No signals are triggered above the Upper Limit or Below the Lower Limit. Unlike the previous version, the upper and lower limits are calculated automatically. Grid levels are determined by four factors: Smoothing, Laziness, Elasticity, and Grid Intervals.
Smoothing:
A moving average (or linear regression) is applied to each close price as a basis. Options for smoothing are Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average.
Laziness:
Laziness is the percentage change required to reach the next level. If laziness is 1.5, the price must move up or down by 1.5% before the grid will change. This concept is based on Alex Grover’s Efficient Trend Step. This allows the grids to be based on even price levels, as opposed to jagged moving averages.
Elasticity:
Elasticity is the degree of “stickiness” to the current price trend. If the smoothing line remains above (or below) the current grid center without reverting but still not enough to reach the next grid level, the grid line will start to curve toward the next grid level. Elasticity is added to (or subtracted from) the gridline by a factor of minimum system ticks for the current pair. Elasticity of zero will keep the gridlines horizontal. If elasticity is too high, the grid will distort.
Grid Intervals:
Grid intervals are the percentage of space between each grid.
Laziness = 4%, Elasticity = 0. Price must move at least 4% before reaching the next level. With zero elasticity, gridlines are straight.
Laziness = 5%, Elasticity = 100. For each bar at a new grid level, the grid will start “curve” toward the next price level (up if price is greater than the middle grid, down if less than middle grid). Elasticity is calculated by the user-inputted “Elasticity” multiplied by the minimum tick for the current pair (ELSTX = syminfo.mintick * iELSTX)
Try experimenting with different combinations of the Smoothing Length, Smoothing Type, Laziness, Elasticity, and Grid Intervals to find the optimum settings for each chart. Lower-priced pairs (e.g. XRP/ADA/DODGE) will require lower Elasticity. Also note that different exchanges may have different minimum tick values. For example, minimum tick for BITMEX:XBTUSD and BYBIT:BTCUSD is .5, but BINANCE:BTCUSDT and COINBASE:BTCUSD is .01.
s3.tradingview.com
DODGEUSDT, 5min. Laziness: 4%, Elasticity 2.5
Number of Grids: 2. Laziness: 3.75%. Elasticity: 150. Grid Interval 2%.
Settings Overview
Smoothing Length : Smoothing period
Smoothing Type : Linear Regression, Simple Moving Average, Exponential Moving Average, Volume-Weighted Moving Average, Triple-Exponential Moving Average
Laziness : Percentage required for price to move until it reaches the next level. If price does not reach the next level (up or down), the grid will remain the same as previous grid (because it’s lazy).
Elasticity : Amount of curvature toward the next grid, based on the current price trend. As elasticity increases, gridlines will curve up or down by a factor of the number of ticks since the last grid change.
Grid Interval : Percent between grid levels.
Number of Grids : Number of grids to show.
Cooldown : Number of bars to wait to prevent consecutive signals.
Grid Line Transparency : Lower transparencies brighten the gridlines; higher transparencies dim the gridlines. To hide the gridlines completely, enter 100.
Fill Transparency: Lower transparencies brighten the fill box; higher transparencies dim the fill box. To hide the fill box completely, enter 100.
Signal Size : Make signal triangles large or small.
Reset Buy/Sell Index When Grids Change : When a new grid is formed, resetting the index may prevent false signals (experimental)
Use Highs/Lows for Signals : If enabled, signals are triggered as soon as the price touches the next zone. If disabled, signals are triggered after bar closes. Enable this for “Once Per Bar alerts. Disable for “Once Per Bar Close” alerts.
Show Min Tick : If checked, syminfo.mintick is displayed in upper-righthand corner. Useful for estimating Laziness.
Reverse Fill Colors : Default fill for fill boxes is green after buy and red after sell. Check this box to reverse.
Note: The Grid Bot Simulator scripts are experimental and works in progress. Please feel free to comment or contact me if you have suggestions/complaints.
Linear Regression + Moving Average1. Linear Regression including 2 x Standard Deviation + High / Low. Middle line colour depends on colour change of Symmetrically Weighted Moving Average . Green zones indicate good long positions. Red zones indicate good short positions. (Custom)
2. Symmetrically Weighted Moving Average. Colour change depending on cross of offset -1. (Fixed)
3. Exponentially Weighted Moving Average. Colour change depending on cross with Symmetrically Weighted Moving Average. (Custom)
Envious Linear Regression TrendHey traders, this is a linear regression moving average trend indicator that is designed to filter out noise and give you a better insight of the current trend in the market. The design is a linear regression cloud that covers above the price or below the price and it changes colour based on the current dominant line through the crossover and crossunder feature. This indicator should be used as a confluence and not as a "trade the crossover indicator" and it is recommended that you combine this with analysis such as support and resistance to see how the market is doing. This indicator works best with Heikin Ashi candlesticks and it supports all chart types too.
Features:
3 Length Modes that are changeable via input on the settings.
Custom Bar Colour
Crossover Markups
Re-Entry Markups
NVME Trend IndexNVME Trend Index is an indicator that confirms the direction of the trend through using a modified linear regression that combines moving averages onto different formulas to create the final result. The main area of the indicator is the columns that are blue and red, these work off the modified linear regression and if a is greater than b then the column will be coloured positively (blue), elsewise it will be negative (red). NVME Trend Index can also be used to identify overbought and oversold zones of the market and due to the way the indicator is outputted it can also be used to identify possible higher highs / lows, lower lows / highs, which can be useful. This can be identified when you zoom out of your charts to see the market structure based on this indicator.
There are only 4 settings to play around with, this is one of our most simplest indicators to use yet.
Setting 1: Index Length : This is a number-based input field that has the minimum value of 5 and maximum value of 30, changing the number inside of here will change how fast / slow the bars will switch trends and this also impacts the values of the column's top and bottom.
Setting 2: Reactivity : This is another number-based input field that has the minimum value of 1 and the maximum value of 200, changing the number inside of here will add towards how fast / slow the bars will switch trends and the lower it is the faster it is, but this will contain some false columns, increasing it will delay the trend switch however remove most false columns.
Setting 3: Trend Scalar : This is another number-based input field that has the minimum value of 10 and the maximum value of 500, changing the number inside of here will impact all of the indicator and the modified linear regression. This will result in smaller or larger columns, faster or slower trend reactions.
Setting 4: Trend Offset : This is the modifier for the trend scalar and this will impact its effectiveness at providing faster / slower trend switches.
This indicator is best combined with NVME Vanquisher X Algorithm, support and resistance analysis or your trading style and our NVME Trend Meter X. Though you could use this, enable the trend cloud feature on NVME Vanquisher and use the calls made.
This script comes with all NVME Scripts.
Realtime Optimized Linear Regression Channelthis script is based on "Optimized Linear Regression Channel" by alexgrover, whose page I recommend you to visit, to read the extensive description he provides
the main difference with the original version is the fact that the start point of the channel (left point) is fixed by setting the time (Begin time input).
This way, the channel size is automatically set, meaning that the channel grows larger as new data comes in, while the starting point remains at the same spot
this can be useful to track a new trend that may be forming from an inflection point or pivot, by selecting begin time as the time of the inflection
also, an end date input is provided to limit the size of the channel.
The script provides two channels:
the main channel that contain all data from begin to end time
the best fit channel that finds the best linear fit inside data from begin to end time
one issue that the script has is the limit in the number of points of size of the channel, that if too large then make the channel disappear (sigh)
PSAR using Moving Linear Regression (LSMA)Works exactly as the standard PSAR with the only difference that a Moving Linear Regression Line (=Least Squares Moving Average, LSMA) is used as input.
So the PSAR flip is triggered not by price itself but by the LSMA line.
Raff Regression Channel by DGTRᴀꜰꜰ Rᴇɢʀᴇꜱꜱɪᴏɴ Cʜᴀɴɴᴇʟ (RRC)
This study aims to automate Raff Regression Channel drawing either based on ZigZag Indicator or optionally User Preference
The Raff Regression Channel , developed by Gilbert Raff, is based on a linear regression, which is the least-squares line-of-best-fit for a price series, with evenly spaced trend lines above and below . The width of the channel is set by determining the high or low that is the furthest from the linear regression.
Because the channel distance is based off the largest pullback or highest peak within a trend, for effectively drawing and using a Raff Regression Channel it is recommend/required that a Raff Regression Channel is applied to “mature” trends. Knowing this requirement, for better automated drawing results this study benefits from the Zig Zag Indicator, where the Zig Zag indicator is used to help identify price trends and changes in price trends. Option to manually adjust lengths for drawing a Raff Regression Channel is also made available.
Using a Raff Regression Channel
Once The Raff Regression Channel is drawn, covering an existing trend, Exᴛᴇɴꜱɪᴏɴ Lɪɴᴇꜱ are drawn to identify ᴛʜᴇ ꜱᴜᴘᴘᴏʀᴛ﹐ʀᴇꜱɪꜱᴛᴀɴᴄᴇ ᴏʀ ʀᴇᴠᴇʀꜱᴀʟ ᴘᴏɪɴᴛꜱ
The trend is up as long as prices rise within this channel. An uptrend may be reversing (not always, but likely) when price breaks below the channel extension . The trend is down as long as prices decline within the channel. Similarly, a downtrend may be reversing (not always, but likely) when price breaks above the channel extension . Moves outside the channel extensions can be indication of a reversal or can denote overbought or oversold conditions
For further details please refer to education post Raff Regression Channel
█ FEATURES
- AUTO or MANUALLY adjusted Raff Regression Channel and Channel Extentions drawing
- ALERTs, for Linear Regression Line, Raff Regression Upper and Lower Channel Extentions
- LSMA , Least Squares Moving Average, in other words Linear Regression Curve
█ SETTINGS
Setting Loopback and Number of Bars are the most important part for The Raff Regression Channel, where ;
- Lookback, defines where the Raff Regression Channel is starting, it is recommended to set to a trend begining
- Number of Bars, defines how many bars to be assumed for calculation, or simply stated the end of the Raff Regression Channel drawing (not extentions but the main channel, extentions by default will be drawn till the last bar)
Setting of Loopback and Number of Bars is performed eigher automatically based on Zig Zag indicator or users may prefer to set them manually. If selected automatically then
- Deviation and Depth values of Zig Zag indicator are used for calculations (enabling visually plotting of ZigZag Lines will help to identify better visually the points), where ;
Deviation, is a multiplier that affects how much the price should deviate from the previous pivot in order for the bar to become a new pivot.
Depth, affects the minimum number of bars that will be taken into account when building
Short-term traders may wish to apply the channel to small waves of a trend so they can reduce the value of the Deviation and Depth
█ OTHER CHANNEL CONSEPTS
Linear Regression Channels, , what linear regression channels are? and linear regression channel/curve/slope study
Fibonacci Channels, how to apply fibonacci channels and automated fibonacci channels study
Andrews’ Pitchfork, how to apply pitchfork and automated pitchfork study
Special Thanks to @Kiss66000 for his kind suggestion, je vous remercie beaucoup @Kiss66000
Disclaimer :
Trading success is all about following your trading strategy and the indicators should fit within your trading strategy, and not to be traded upon solely
The script is for informational and educational purposes only. Use of the script does not constitute professional and/or financial advice. You alone have the sole responsibility of evaluating the script output and risks associated with the use of the script. In exchange for using the script, you agree not to hold dgtrd TradingView user liable for any possible claim for damages arising from any decision you make based on use of the script
TradiKator 09 HH HL LH LL & Linear Regression
TradiKator 09 HH HL LH LL & Linear Regression indicates whether current price movement exceed the trend or not.
Here, we use Higher High,Higher low, Lower High, Lower Low to identify a possible change of trend.
Also we use 2 Linear Regression Channels (short term & long term) to identify a price trend.
I hope this indicator can help traders to estimate trend change in the essential trading behavior.
1)Higher High,Higher low, Lower High, Lower Low
Higher High and Higher Low indicates a Bull trend
Lower High and Lower Low indicates a Bear trend
Those high low pivot points is a verg good mark to judge if current trend keeps going on or not.
Setting :
Left pivot length
Right pivot length
The longer pivot length is , the less sensetive and more delay you signal will be, especially the right privot
2)Linear Regression Channels
Linear Regression Line – is a line drawn according to the least-squares statistical method which produces a best fit line
The resulting can be used to predict price trend from the same system.
Setting :
Count ---> the length of the Linear Regression, remember more data in interest = less accuracy and bigger sigma
The End bar of Linear Regression ---> If you don't want latest K bar in the Linear Regression interest (they are not in the same trend), then you can move the Linear Regression to earlier bar
This indicator is inspired by GDT who is a great coder.
Known issue:
Not yet.
Multiband - Market TimerThis strategy is made for market timing in the bull markets. Hence, more ideal to use it with index ETFs or high conviction large caps.
This makes use of different custom indicators:
Multi Band Channel - Overbought/Oversold Oscillator
VixFix Linear regression
Regular Linear Regression.
Multi Band Oscillator is used for identifying overbought/oversold state of the instrument. This is used in conjunction with VIXFix Linear Regression to to find market bottoms for entry conditions.
Few parameters are explained below:
CheckBandDistance - If checked checks for narrow bands and ignore signals when crossover happens in narrow bands.
ConsiderOversoldDaysCounter/ConsiderOverboughtDaysCounter - If checked, considers oversold and overbought crossovers only if instrument stays in oversold/overbought state for that many bars.
UseLinearRegressionToOpen/UseLinearRegressionToClose - If checked, combines linear regression along with overbought/oversold condition for entry and exits.
UseVixFixToOpen - Uses VixFixLinear regression to identify market bottom and this condition will be combined with oversold/overbought state. When using VixFixLinearRegression signal, we can allow generating entry signals during non crossover bars. Vix Fix Entry Range sets the max bar for multi band state to be for generating signal. For example, if Vix Fix Entry Range is set to oversold, signal is generated based on VixFix if price is below oversold.
ExitStrategy - This can be trailing/reversal or combined. If set to reversal, exit will happen on state moving out of oversold region. If set to Trailing, stop will be based on trailing stops. Indicator shows what is the present stop value. If set to combined, exit will happen on stages. 30% of the remaining position gets closed upon reversals. State may go into oversold and return back many times before having full exit. If this happens, each time, 30% of the position will be closed. Full position closure happens on hitting training stop.
Candles are colored based on linear regression.
Green -> positive and moving up
Lime -> Positive moving down
Orange -> Negative moving up
Red -> Negative moving down
Purple -> Possible VixFix peak - aka Market bottom
Another snapshot of the script along with Linear regression and VIXFix-LinReg indicators:
Related scripts are found here:
I have not put additional indicators to identify trend. But, can be combined with higher timeframe trend filters to generate better signals. Making this as invite only script as I find it very lucrative to time index ETFs. Please PM me if you want to try this script.
VixFixLinReg-IndicatorSame as VixFixLinearRegression strategy published earlier - but as indicator for those who want to use it as indicator.
Strategy can be found here:
Concept is simple:
Based on VixFix script by Chris Moody. VIX-Fix can sometime give early signal. Hence, apply linear regression for better estimation of market bottom. Area above 0 shows VixFix whereas the below 0 area is linear regression of VixFix. To estimate market bottom:
First wait for VixFix to turn lime
Then wait for linear regression to turn lime from green.
VixFix may no longer be lime by linear regression chages. But, that's ok.
Have also added option candle color to highlight bottom and alert condition for those who want to use it.
VixFixLinReg-StrategyThis idea came up while discussing about strategies with one of the trading enthusiast from tradingview community.
Strategy basically uses existing script of Vix Fix by Chris Moody:
VixFix is a great indicator for finding the market bottoms. But, sometimes it generates signal too early. But, we can apply linear regression on vix fix to find vix fix top to make timing much better.
Entry condition:
Wait for Vix fix bar to turn lime.
Once vix fix is turned lime, then wait for linear regression (shown below 0) to turn lime from green. This indicates VIX-Fix has started declining.
Go long once above two conditions are satisfied
Exit Condition:
ATR Based Stop
Applied only if linear regression is green - which means VixFix rising.
Note: This is ideal for identifying market bottom. May not yield good results on individual stocks.
Mayfair Advanced Regressions 1.0This indicator maps two regressions.
The outer regression (green straight lines in the chart) tracks the main trend. It save you from working out your own trend channels, BUT it does move with the price, so it is different from a static channel. You can use it as a template for drawing static channels though.
The inner regression (the curved lines) is a parabolic regression. It shows the shorter term trend within the outer trend. This helps traders to judge when it is right or wrong to take a position on the edge of the main regression, based on whether the inner regression is indicating an acceleration out of the channel, or is shaping to go with the main trend.
We find it works best if there is a clear trend. If the market is not trending, then there isn't much point using a trend analysis tool like this.
Like all indicators, it is not perfect, and you should never rely on one indicator in any situation.
Linear Regression Channel / Curve / Slope by DGTTʜᴇ Lɪɴᴇᴀʀ Rᴇɢʀᴇꜱꜱɪᴏɴ Cʜᴀɴɴᴇʟꜱ
Linear Regression Channels are useful measure for technical and quantitative analysis in financial markets that help 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
The basis of a linear regression channel
Linear Regression Line – is a line drawn according to the least-squares statistical technique which produces a best-fit line that cuts through the middle of price action, a line that best fits all the data points of interest. The resulting fitted model can be used to summarize the data, to predict unobserved values from the same system. Linear Regression Line then present basis for the channel calculations
The linear regression channel
2. 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.
3. 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.
Unlike Fibonacci Channels and Andrew’s Pitchfork, Linear Regression Channels are calculated using statistical methods, both for the regression line (as expressed above) and deviation channels. Upper and Lower channel lines are presenting the idea of bell curve method, also known as a normal distribution and are calculated using standard deviation function.
A standard deviation include 68% of the data points, two standard deviations include approximately 95% of the data points and any data point that appears outside two standard deviations is very rare.
It is often assumed that the data points will move back toward the average, or regress and channels would allow us to see when a security is overbought or oversold and ready to revert to the mean
please note : Over time, the price will move up and down, and the linear regression channel will experience changes as old prices fall off and new prices appear
█ Linear Regression Study Features
Linear Regression Channel
- Linear regression line as basis
- Customizable multiple channels based on Standard Deviation
- ALERTs for the channel levels
Linear Regression Curve
- Linear regression curve as basis
- Optional : Bands based on Standard Deviation or Volatility (ATR). Bands are applied with fixed levels 1, 2 and 3 times StdDev or ATR away from the curve
Linear Regression Slope
- Optional : Up/Down slope arrows for a used defined period
█ Volume / Volatility Add-Ons
High Volatile Bar Indication
Volume Spike Bar Indication
Volume Weighted Colored Bars
LinReg Triangular FiffyLinReg Triangular Fiffy
What this Script can help you with ?
1. It helps you figure out the Historical Breaks of the Linear Regression Channel { default length : 20, stdev : 2}, These historical breaks are plotted as Blue and Orange Dots
2. Also it plots the Level corresponding the Points where the historical breaks have happened as {blue and orange horizontal Lines}
3. It takes the historical Breaks of the LR Channel as Input to a triangular function which plots the trend based market bands in yellow
** The script have Provisions for Alerts
**** LinReg Breakout Bull
**** LinReg Breakdown Bear
How to Trade with the Script ?
First you will receive the alerts that there is a break of the linReg Band
Then you look at the Triangula Yellow Bands, whether it is below the closing price or above it
If you receive a Bullish Signal and the Triangular Bands are below the closing price then you take long,
If you receive a Bearish Signal and the Triangular Bands are above the closing price then you take short,
If you receive a Bearish Signal and the Triangular Bands are below the closing price then you take short, till the upper band, {for begginers, its noTrade situation}
If you receive a Bullish Signal and the Triangular Bands are above the closing price then you take Long, till the Lower band, {for begginers, its noTrade situation}
How to get access ?
Just private message me, I will be happy to share u guys!
Body/Wick to Range Osc.This script is meant to be a form of pure candlestick analysis.
Terminology in the description used below is as follows:
- numcands = Number of candles specified by the user to be used for sampling in each moving average.
This script plots moving average (SMA/EMA specified by the user ) of the percentage of the high-low range that the previous {numcands} candles the upper wicks, lower wicks, and the body take up.
The user may specify if the absolute value of the body percentage is to be used (true by default). To account for this, a horizontal line is also plotted at 0 to show when the body percentage moves above or below 0.
The values that all of these moving averages plotted will oscillate between 0 and 1 (-1 and 1 for the body percentage if the absolute value of candles is not used).
Other notes: The user may select the colors used (colorblind support, as the defaults are red and green). Cross overs and cross unders are accounted for in alertconditions (as is if the body % moves above and below 0% if absolute values are not used).
An interpretation of the use of this script may be: If the upper wicks begin to take up a larger portion of the high-low range, it may signal downward selling pressure (and vise-versa for lower wicks). However, this may be open to interpretation based upon the specified {numcands} used.
Parallel Channel [WS]- it is paid version
if you want free version
- what is it
it show parallel channel auto-matically
- how is possible (source is protected)
it just use linreg function (built-in pine script function.)
and find center line from 'learning_length' candle.
also stdev between candle and center line.
also max distance.
and draw channel using center-line + stdev + fibonacci ratio + max distance.
until the channel get broken, it keep same channel.
so this is not re-paint indicator.
it is leading actually.
source : 캔들의 무슨값을 사용해서 계산하는지를 결정합니다. 사실 뭘 하든 크게 안바뀌긴 합니다.
learning length : 학습량인데 길게 잡으면 대체로 더 큰 밴드가 나옵니다. 과거 캔들을 학습해서 선들을 그리는데 이 값만큼 학습합니다. 300이면 300개 지나간 캔들을 학습합니다.
한번 학습하여 채널이 결정되면, 채널 이탈이 나오기 전까지 재학습 안합니다. (그래서 리페인팅이 없습니다.)
즉, 채널의 시작점에서 지나간 300개 캔들이 학습대상입니다.
학습이라는 표현이 어색할 수 있는데, 쉽게 말하자면 300개 캔들을 가로지르는 중앙선을 찾습니다. 그리고 최대폭도 여기서 찾습니다. 이것을 학습이라고 부릅니다.
channel max length : 채널의 최대길이입니다. 채널이 한번 결정되고, 이탈을 하지 않아도 이 값을 넘어가면 새로 채널을 그립니다.
band factor : 채널의 최대폭의 배수입니다. 이값의 1/10을 사용합니다. 즉 10이면 1이 됩니다. 채널이탈의 기준이 되는 선도 이것입니다.
leading length. 선행하여 선을 더 그려주는데 선행의 길이입니다.
standard .... multi ... 표준편차로 계산된 선들의 폭입니다. 기본은 피보나치 비율.
channel escape : 채널 이탈 기준을 표준편차선3 을 기준으로 바꿀 수 있습니다.
debug_mode. 과거 방향 (왼쪽방향) 으로의 가이드 선을 학습량 만큼 보여줍니다.
기존의 다른 유사 지표들을 보면 이 선을 보여주는데, 이 선으로 매매 못합니다. 거의 리페인팅이나 마찬가지인 선입니다.
다 지나간 뒤에 고점 저점 찾아서 연결해주고 있으니 리페인팅이나 마찬가지입니다.
밴드폭이 어떤 캔들을 기준으로 만들어졌는지 확인하는 용도로 쓸 수 있습니다. 그래서 이름이 debug...입니다.
Koalafied Z-ScoreZ-Score indicator derived from Pecker's previously released indicators (Percentile and PPO Fishnet). Includes linear regression bands weighted by volume/volatility.