Combined LazyBears ZeroLag EMA and CapnOscars moving average ADX. Here's the result.
I figured it could be used as a trend trendtrading system,
ADX red + ema cross downards = short.
ADX green + ema cross up = long.
ADX black + ema cross = no trade
Or something along those line. A way filter out whipsaws.
This is just something I threw together in 5 min, so...
This is a alternative version of the well known "ZigZag indicator" but it uses turning points of the Jurik ma
instead of the traditional "pivot points" that are by definition lagging by a large lookback period, the (almost-) Zero Lag ZigZag lags by about 2 bars on average (depending on the candles forming)
The ZigZag pattern can be used to draw trendlines and S/R...
A regression line is simply a single line that best fits the data.
In the pinescript you can plot a linear regression line using the linreg function.
Here i share the entire calculation of the linear regression line, you are free to take the code and modify the functions in the script for creating your own kind of filter.
A derivation of the Kalman Filter.
Lower Gain values create smoother results.The ratio Smoothing/Lag is similar to any Low Lagging Filters.
The Gain parameter can be decimal numbers.
Kalman Smoothing With Gain = 20
For any questions/suggestions feel free to contact me
A 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...
I already estimated the least-squares moving average numerous times, one of the most elegant ways was by rescaling a linear function to the price by using the z-score, today i will propose a new smoother (FLSMA) based on the line rescaling approach and the inverse fisher transform of a scaled moving average error with the goal to provide an...
Another lsma estimate, i don't think you are surprised, the lsma is my favorite low-lag filter and i derived it so many times that our relationship became quite intimate. So i already talked about the classical method, the line-rescaling method and many others, but we did not made to many IIR estimate, the only one was made using a general filter...
Adapt To The Right Situation
There are already some Adaptive Stochastic scripts out there, but i didn't see the concept of using different periods highest/lowest for their calculations. What we want
for such oscillator is to be active when price is trending and silent during range periods. Like that the information we will see will be clear and easy to...
Single Exponential Smoothing ( ema ) does not excel in following the data when there is a trend. This situation can be improved by the introduction of a second equation with a second constant gamma .
The gamma constant cant be lower than 0 and cant be greater than 1, higher values of gamma create less lag while preserving smoothness.Higher values of length ...
Using 4 smoothed Slopes (not lagging) and checking when they start to decrease (entering the orange zone) we can either get a general idea (although quite chaotic) view or general tendency of all together .
Use them trading the equity in 4 parts. one will be trading on faster movements (faster slope), second slightly slower and...
It was one of my most requested post, so here you have it, today i present a way to estimate an LSMA of any degree by using a kernel based on a sine wave series, note that this is originally a paper that i posted that you can find here figshare.com , in the paper you will be...
There are tons of filters, way to many, and some of them are redundant in the sense they produce the same results as others. The task to find an optimal filter is still a big challenge among technical analysis and engineering, a good filter is the Kalman filter who is one of the more precise filters out there. The optimal filter theorem state that :...
Even Shorter Estimation
I know that i'am insistent with the lsma but i really like it and i'm happy to deconstruct it like a mad pinescript user. But if you have an idea about some kind of indicator then dont hesitate to contact me, i would be happy to help you if its feasible.
My motivation for such indicator was to use back the correlation function (that i...
The Self Referencing Stochastic Oscillator
The stochastic oscillator bring values in range of (0,100). This process is called Feature scaling or Unity-Based Normalization
When a function use recursion you can highlights cycles or create smoother results depending on various factors, this is the goal of a recursive stochastic.
For example : k =...
An adaptive filtering technique allowing permanent re-evaluation of the filter parameters according to price volatility. The construction of this filter is based on the formula of moving ordinary least squares or lsma , the period parameter is estimated by dividing the true range with its highest. The filter will react faster during high volatility periods and...