Raff Regression Channel (RRC) The Raff Regression Channel (RRC)
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.
Once The Raff Regression Channel is drawn, covering an existing trend, EXTENSION LINES are drawn to identify support, resistance, reversal points, mean reversion
Effectively drawing and using a Raff Regression Channel
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
breakout example
reversal example
█ LINK to AUTOMATED INDICATOR VERSION of RAFF REGRESSION CHANNEL
█ OTHER CHANNEL CONSEPTS
Linear Regression Channels,
Fibonacci Channels,
Andrews’ Pitchfork,
Linreg
Volume Regression Trick (feat. Serbian Užičko Kolo dance music)Okay, this is a simple trick with the built-in Linear Regression indicator. I have used two instances of the indicator, but with different sources. The first one uses price of an instrument and the second one uses volume of an instrument. Yes, it is possible to use non-standard source because the indicator has a special input for that.
As result you get a simple tool for trend analysis and its common cases like trend exhaustion or confirmation.
Good luck and stay cheeki breeki!
Approximating A Least Square Moving Average In PineLeast Squares Moving Average, Running Least Squares, Regression Line or even Running Line, this method is among the most popular ones in statistics and technical analysis.
The LSMA is extremely useful, it approximate the price pretty well and can be considered as one of the best low-lagging filters out there. Knowing how this filter is made can be really interesting. May the methods i share below inspire you to create great indicators or start coding in pine :)
A Least Squares Moving Average is defined by Tradingview as :
A line that best fits the prices specified over a user-defined time period. It is calculated using the least squares method. The result of this function is calculated using the formula: linreg = intercept + slope * (length - 1 - offset), where length is the y argument, offset is the z argument, intercept and slope are the values calculated with the least squares method on source series (x argument).
Alright, we wont use the offset parameter for our approximations, so how to calculate a least squares moving average ? If you find the mathematical formula of it you will certainly ask yourself "what are all of those maths" . But its ok, in the Pinescript you can just use the linreg() function, or you could calculate it like that :
slope = correlation(close,n,length) * (stdev(close,length)/stdev(n,length))
intercept = sma(close,length) - slope*sma(n,length)
linreg = slope*n + intercept
Ok, but can we use different estimation methods ? Certainly, the key of the LSMA is only the correlation coefficient after all, all the other parameters can be estimated.
Standard Score Or Rescaling A Line To The Price
Rescaling a line to the price is easy to do, it will give a similar result as the LSMA but it is faster to write, here the code :
A = (n - sma(n,length))/stdev(n,length) * correlation(close,n,length)
B = sma(close,length) + A*stdev(close,length)
Easier no ? We first standardized a line (n) and multiplied it by its correlation with the price, our first parameter A is dimensionless .
Then we rescaled the result to the price by multiplying our parameter with the price standard deviation and summing this result to the price moving average.
here the difference between our method and the classic LSMA of both period 100
If you put both together you wont see any difference. Overshoots can be reduced by modifying the standard deviation size.
Correlation Rescaling
The correlation coefficient is the core of a LSMA, if we rescale it we can approximate a LSMA, here the code :
a = (correlation(close,n,length) + 1)/2
b = sma(close,length) + stdev(close,length)*1.7
c = sma(close,length) - stdev(close,length)*1.7
k = c + a*(b-c)
The correlation coefficient oscillate in a range of 1/-1, we first scale it in a range of 1/0. Then you may have recognized the b and c formulas, they are the one used in bollinger bands,
the standard deviation is multiplied by 1.7 because it was the number who best approximated a LSMA, but it could be any number defined by the user, something interesting is that this method to can fix overshoots in a classic LSMA using lower multiplier. Since our correlation is in a range of 1/0 we can rescale it to the price thanks to the method used in k.
In red our method, in blue the LSMA of both period 100.
Here the standard deviation is not multiplied by a number, this result in less overshoot.
In order to have even more manipulation over the LSMA i will try to estimate the correlation coefficient the best i can :)
So here you go, i hope you will find a use for it.
Trading with the Trend, $NYXNyx Gaming Group has just had a 46% price increase in the past two weeks up until its peak. Price is now very overbought and as stated on the chart there are several bearish indications of why this is a good short sale. Also as you can see on the chart, price recently bouced back from the top lin reg line as it did a couple months ago. Price target is middle lin reg line.
Trading with the Trend, $EDRAs you can see by looking at this chart, price action has been following the upwards linear regression channel. It has just bounced from trading at the bottom lin reg line and is showing several bullish indications as stated on the chart. My price target is around the upper lin reg line (green rectangle).
Trade valid until price closes below bottom lin reg line.
Trading with the Trend, $SVMSilvercorp Metals Inc. is looking like it is ready to continue following its upwards trend. As stated on the chart, there are several bullish indications that support why I believe this will continue to climb. If price breaks above the mid reg line, I am watching for a price target close to the upper lin reg line around $4.65 - $5.00
Trade valid until price closes below lower lin reg line.
Trading with the Trend, $APH$APH, Aphria Inc. has been uptrending for months now. Using the lin reg lines you can see that it has bounced off of the top and has recovered using the mid line as a support. As stated on the chart there are several bullish indications and Im looking for a price target somewhere along the top lin reg line (green rectangle on chart).
Trade valid until price closes below mid lin reg line.
No more support, where does it land. I don't care, personally. I'm out. We pierced the only support that mattered.
Watch out for sharks... the whales have left the building.
And once again, they say, thank you for your buy support as they sold off their bags of holding.
Here that noise? It's the sound of an overinflated, no-intrinsic-value ponzi, deflating.
It's even dropping as I'm writing this {"amount":"333.18","currency":"USD"}
This is SPECIFICALLY what I mean, when I say, you cannot predictThis is SPECIFICALLY what I mean, when I say, you cannot predict bot action.
www.cryptocoinsnews.com
How much did you lose on this? Or were you prepared for the take?
There are SOOOOOO many bots out there.
quatloos.org
bitcointalk.org
www.coindesk.com
AND, soooo many more idiots that don't know how to use them.
Please don't go long on a fully manipulated market.
Granted, all markets, forex, stock, commodities, ALL of them, have bots... but they have volume too, to protect against aggressive bots. OBVIOUSLY, Bitcoin, and cryptocurrency/ALTcoins do NOT.
That's a rough 96 hoursI really don't have much to say ...
But I am happy that my remaining sells all triggered
at $605 while I was being evilly trolled by the $1000 bulls.
And except for a few morsels left that I trade altcoins
with, I'm 100% out, til the bottom, then maybe I'll
come back out and play.