Robust Weighting OscillatorIntroduction
A simple oscillator using a modified lowess architecture, good in term of smoothness and reactivity.
Lowess Regression
Lowess or local regression is a non-parametric (can be used with data not fitting a normal distribution) smoothing method. This method fit a curve to the data using least squares.
In order to have a lowess regression one must use tricube kernel for the weightings w , the weightings are determined using a k-nearest-neighbor model.
lowess is then calculated like so :
Σ (wG(y-a-bx)^2)
Our indicator use G , a , b and remove the square as well as replacing x by y
Conclusion
The oscillator is simple and nothing revolutionary but its still interesting to have new indicators.
Lowess would be a great method to be made on pinescript, i have an estimate but its not that good. Some codes use a simple line equation in order to estimate a lowess smoother, i can describe it as ax + b where a is a smooth oscillator, b some kind of filter defined by lp + bp with lp a smooth low pass filter and bp a bandpass filter, x is a variable dependent of the smoothing span.
Regression
Dorsey InertiaThis indicator was originally developed by Donald Dorsey (Stocks & Commodities, V.13:9 (September, 1995): "Refining the Relative Volatility Index").
Inertia is based on Relative Volatility Index (RVI) smoothed using linear regression.
In physics, inertia is the tendency of an object to resist to acceleration. Dorsey chose this name because he believes that trend and inertia are related and that it takes more effort and energy to reverse the direction of a stock or market than to keep it in the same direction. He argues that the volatility is the simplest and most accurate measure of inertia.
When the indicator is below 50, it signals bearish market sentiment and when the indicator is above 50 it signals a bullish trend.
Good luck!
Kirshenbaum BandsThis 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.
Good luck!
HLC Banded Quadratic RegressionHigh/Low/Close Banded Quadratic Regression is now available through this implementation, free for all to use. It's simple purpose is to plot multiple independent parabolic curvatures using a matrix equation that best fits the non-linear data sets of high, low, and close. Features include an available dark background disabled by default for the overlay chart, adjustable regression period, and a banding lines width adjustment. If you have any comments regarding this indicator, I will consider your thoughts and ideas presented below.
linear regression channel (lirshah)linear regression channel is an indicator which has been written according to linear regression and exponential moving average (ema).
the indicator nicely shows major trend and key levels and has a good performance on almost all pairs and time frames.
Trader Set - Trailing StopThis is the last tool for my methodology. It provides additional levels of support / resistance that you can use for trailing stop. Like every single tool in this toolbox and methodology, the formula being used is unique and totally original and you can't find it any where else.
Please don't contact me for getting access to these tools, they are only available for my students. Right now, the English version of the website and learning material is under development and soon, when they are ready I'll post a comment under every single script related to this methodology for those who are interested in participating for the course.
Tensor CloudIntroducing the Tensor Cloud. This is probably the best indicator I've come up with so far. I'm really proud of it. Ichimoku is a brilliant system. It's been around for over half a century and I praise Goichi Hosoda for his brilliant work. However, it's time for something new. I love math and this indicator really showcases that. The Tensor Cloud is an indicator of its own. It is not related to Ichimoku at all. The only thing they have in common is that they both form clouds. The maths in Tensor Cloud are 100% apart.
The Tensor Cloud is mostly comprised of some special forms of linear regression. Let's do a rundown.
Future Span A (Green)
This is one predictor using a linear regression technique. Future Span A is one of the two lines that makes up a Tensor Cloud. From here on out it will traditionally be colored green. It can be used as both a predictor on its own and comprising the Tensor Cloud. This can also be viewed as sort of a long signal when crossing up Future Span B. This line can also be used to help identify levels of support and resistance.
Future Span B (Red)
This is another form of linear regression meant specifically to work alongside Future Span A. This is the second line that comprises a Tensor Cloud. From here on out it will traditionally be colored red. It can be used both as a predictor on its own and comprising the Tensor Cloud. This can also be viewed as sort of a short signal when crossing down through Future Span A. This line can also be used to help identify levels of support and resistance.
Safe (White)
The Safe is a moving average taken of Future Span A and Future Span B. It is highly predictive. From here on out it will traditionally be colored white.
Tip (Fuchsia)
This is yet another form of regression and is highly predictive. The Tip can also be used to help judge trend strength and probability of reversal. More study is of course needed. More on that later in this description. From here on out it will traditionally be colored fuchsia. This line can also be used to help identify levels of support and resistance.
The Tensor Cloud
The space between Future Span A and Future Span B is shaded in green or red, depending on which Future Span is on top. If Future Span A is on top, the Tensor Cloud will be green. This is considered a long signal. If Future Span B is on top, the Tensor Cloud will be colored red. This is a short signal. Attention should also be given to other factors such as:
The position of price in relation to the Tensor Cloud (Under, inside or above).
The position of Tip in relation to the Tensor Cloud.
Crosses of Future Span A and Future Span B.
Tensor Twist
Whenever Future Span A and Future Span B cross (In either direction), this is called a Tensor Twist. If Future Span A is crossing up, this is a long Tensor Twist. If Future Span B is crossing up, this is a short Tensor Twist.
Closing Summary
Much study needs to be done. This is a brand new technique. It's up to all of you to help figure out the best ways to use it. I may still add other components to this indicator but it's pretty solid as is. You will notice that the two integer inputs are set to 27. Twenty-seven is a very important number in mathematics. The details of that are beyond the scope of this description but from here on out, the traditional setting for those will be 27. You will notice that I am not yet releasing the source code to this indicator. For now, it will remain protected. Once I have enough feedback and we're all happy with the final result, I will release the code for the world to have. I have no wish of keeping this closed-source (As profitable as that might be). I just want it to help as many people as possible.
Please share this on social media so we can attract as many testers to give feedback as possible. For publishing this for free, that's all I ask in return. That way it will be as solid as possible when I release the source code.
Enjoy!
Quadratic Regression Slope [DW]This is a study geared toward identifying price trends using Quadratic regression.
Quadratic regression is the process of finding the equation of a parabola that best fits the set of data being analyzed.
In this study, first a quadratic regression curve is calculated, then the slope of the curve is calculated and plotted.
Custom bar colors are included. The color scheme is based on whether the slope is positive or negative, and whether it is increasing or decreasing.
Quadratic RegressionA quadratic regression is the process of finding the equation that best fits a set of data.This form of regression is mainly used for smoothing data shaped like a parabola.
Because we can use short/midterm/longterm periods we can say that we use a Quadratic Least Squares Moving Average or a Moving Quadratic Regression.
Like the Linear Regression (LSMA) a Quadratic regression attempt to minimize the sum of squares (sum of the squared difference between a set of data and an estimator), this is why
those kinds of filters have low lag .
Here the difference between a Least Squared Moving Average ( green ) and a Quadratic Regression ( red ) of both period 500
Here it look like the Quadratic Regression have a best fit than the LSMA
Auto Regression Divergence Indicator (ARDI) Auto Regression Divergence Indicator (ARDI)
Class : oscillator
Trading type : reverse trading
Time frame : any
Purpose : reverse points detection
Level of aggressiveness : any
Indicator «Auto Regression Divergence Indicator» (ARDI) is used to detect moments of divergence between current prices and fair (theoretical) value of the asset. Significant divergences signal about price entering into overbought/oversold zones. This is a base to open positions which are contrary to the current movement.
Structure of the indicator
Indicator consists of the multicolored oscillatory line. Green color signals that no significant divergences present. Blue (red) color signals about the presence of significant divergences between current and theoretical prices. Blue color means that price is in oversold zone and red – in overbought.
Input parameters of the indicator
To set up the indicator a number of input parameters are used:
- AR period (period of indicator, by default = 21) – is used to calculate the theoretical price based on linear regression model;
- Number of deviations (number of standard deviation, by default = 1) – this parameter is responsible for the level of aggressiveness. The bigger the value is the less quantity of the signals will be generated by the indicator, but the higher their quality will be.
Rules of trading
Indicator can be used on any time frame.
General rules of trading are as follows:
- When oscillatory line changes color on blue – this is a signal that current price enters the oversold zone;
- When oscillatory line changes color on red – this is a signal that current price enters the overbought zone;
- “buy” trades from the blue lines;
- “sell” trades from the red lines;
- it is desirable to wait for a change in the direction of the indicator line before opening a trade.
Regression OscillatorRegression Oscillator indicator script.
This indicator was originally developed by Richard Goedde (Stocks & Commodities V.15:3, Timing A Stock Using The Regression Oscillator).
Line Regression Intercept Linear Regression Intercept is one of the indicators calculated by using the
Linear Regression technique. Linear regression indicates the value of the Y
(generally the price) when the value of X (the time series) is 0. Linear
Regression Intercept is used along with the Linear Regression Slope to create
the Linear Regression Line. The Linear Regression Intercept along with the Slope
creates the Regression line.
LinearRegressionChannelBreakoutMy first idea about the linear regression channel... It is free and available for everybody.
Fractal Regression Bands [DW]This study is an experimental regression curve built around fractal and ATR calculations.
First, Williams Fractals are calculated, and used as anchoring points.
Next, high anchor points are connected to negative sloping lines, and low anchor points to positive sloping lines. The slope is a specified percentage of the current ATR over the sampling period.
The median between the positive and negative sloping lines is then calculated, then the best fit line (linear regression) of the median is calculated to generate the basis line.
Lastly, a Golden Mean ATR is taken of price over the sampling period and multiplied by 1/2, 1, 2, and 3. The results are added and subtracted from the basis line to generate the bands.
Williams Fractals are included in the plots. The color scheme indicated whether each fractal is engulfing or non-engulfing.
Custom bar color scheme is included.
lin.reg.s_420Hey all,
Snoop here with another script this one is linear regression slope analysis;
I used a base skeleton script of /u/ucsgears before adding some other cumulative log filtering and average customization functions I like :)
If you have success with this script feel free to buy me a coffee through my bitcoin address :)
Appreciate the love I get from the community! Thanks all and happy trading!
-Snoop
Momentum Linear RegressionThe original script was posted on ProRealCode by user Nicolas.
This is an indicator made of the linear regression applied to the rate of change of price (or momentum). I made a simple signal line just by duplicating the first one within a period decay in the past, to make those 2 lines cross. You can add more periods decay to made signal smoother with less false entry.
Function 2 Point Line using UNIX TIMESTAMP V1experimental:
draws a line from 2 vectors(price, time)
update:
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.
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
BUY & SELL PRESSURE XeLMod V2BUY & SELL PRESSURE Oscillator
Ver. 2.0 XelMod
WHAT'S THIS?
This is an UPDATED version of a previous script already posted.
List of changes from previous script:
Separated as Column Histogram just the Regressive (Rate-Of-Change) Force of the indicator which gives a faster response of the trend.
Default period is now set to 81, as better Oscillator swing lagging.
This is an excelent momentum indicator very similar to ADX but in a candle weighting distribution rather than ranges.
For additional reference:
Karthik Marar BUY AND SELL PRESSURE INDICATORS.
Cheers!
Any feedback will be welcome...
@XeL_Arjona
Standard Error of the Estimate -Composite Bands-Standard Error of the Estimate - Code and adaptation by @glaz & @XeL_arjona
Ver. 2.00.a
Original implementation idea of bands by:
Traders issue: Stocks & Commodities V. 14:9 (375-379):
Standard Error Bands by Jon Andersen
This code is a former update to previous "Standard Error Bands" that was wrongly applied given that previous version in reality use the Standard Error OF THE MEAN, not THE ESTIMATE as it should be used by Jon Andersen original idea and corrected in this version.
As always I am very Thankfully with the support at the Pine Script Editor chat room, with special mention to user @glaz in order to help me adequate the alpha-beta (y-y') algorithm, as well to give him full credit to implement the "wide" version of the former bands.
For a quick and publicly open explanation of this truly statistical (regression analysis) indicator, you can refer at Here!
Extract from the former URL:
Standard Error Bands are quite different than Bollinger's. First, they are bands constructed around a linear regression curve. Second, the bands are based on two standard errors above and below this regression line. The error bands measure the standard error of the estimate around the linear regression line. Therefore, as a price series follows the course of the regression line the bands will narrow, showing little error in the estimate. As the market gets noisy and random, the error will be greater resulting in wider bands.