One-Sided Gaussian Support & Resistance Rate [Loxx]One-Sided Gaussian Support & Resistance Rate is a mean reversion oscillator much like Fisher Transform. This indicator is built using a one-sided Gaussian filter. If you pair this with Fisher Transform and line up the settings, you'll notice similar outcomes. You'll notice that as the oscillator levels out at around zero or one that this signifies a zone of resistance or support. See here for more details on calculating the OS Gaussian Filter:
Included:
Bar coloring
Signals
Alerts
Ehlers 2-Pole Super Smoothing for smoothing source inputs
Gaussian
One-Sided Gaussian Filter w/ Channels [Loxx]One-Sided Gaussian Filter w/ Channels is a Gaussian Moving Average that is calculated using a Fibonacci weighting function. Keltner channels have been added to show zones of exhaustion. A better name would be "Half Gaussian bell weighted" or "Half normal distribution weighted" indicator, since the weights for calculation of the average (similar to linear weighted average) are taken from a normal distribution curve like function--but only the half of the curve is used for calculation.
Information of the Gaussian distribution can be found here : en.wikipedia.org and once you take a look at the standard normal distribution curve, it will be much clearer what is exactly done in this indicator.
After the Gaussian Filter is applied to the source input, an Ehlers' 2-Pole Super Smoother is applied to reduce noise without significant lag.
Included:
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types
Goertzel Cycle Period Adaptive Fisher Transform [Loxx]Goertzel Cycle Period Adaptive Fisher Transform is an adaptive Fisher Transform using the Goertzel Cycle Algorithm to derive length inputs.
What is Goertzel Cycle Algorithm?
Read here:
What is Fisher Transform?
The Fisher Transform is a technical indicator created by John F. Ehlers that converts prices into a Gaussian normal distribution.
The indicator highlights when prices have moved to an extreme, based on recent prices. This may help in spotting turning points in the price of an asset. It also helps show the trend and isolate the price waves within a trend.
Included:
Zero-line and signal cross options for bar coloring
Customizable overbought/oversold thresh-holds
Alerts
Signals
***Please note, the Goertzel Cycle Algorithm is processor heavy, so this indicator will take some time to load.
Surmount GausSAROverview
The Surmount GausSAR is a simplified version of an idea to extend the basic Gaussian model by allowing for endogenous regime switching. Conditional on a given regime, the distribution of price changes is multivariate normal.
However, when the endogenous regimes are integrated out, it becomes a mixture of Gaussian distributions .
Concepts
This approach accommodates heavy tails, persistence, and nonlinear dynamics. More precisely, let k = 1,…, K denote the admissible regimes and Zt with values in {1,…, K} denote the market regime at date t. It is assumed that
(Zt) is a Markov chain with transition matrix Q.
The distribution of price changes Δpt conditional on
Zt=k,Δpt_,Zt_
is multivariate normal N .
.
Probabilities pk can be computed numerically and parameters μk, Ωk, ∀k and Q can be estimated by means of the Kitagawa's algorithm. Then, the conditional VaR is estimated from drawings in the mixture distribution after replacing pk, μk, Ωk by their estimates.
This approach is different from the mixture of normal distributions proposed by J.P. Morgan as a new methodology of VaR computation. Under the J.P. Morgan approach, the regime indicators (Zt) are assumed time independent.
How To Use
The indicator has been color coded to make for quick & easy visual understanding.
Put simply:
Green = Bullish
Purple = Decreasing Bullish-ness or Neutral
Orange = Bearish
Yellow = Decreasing Bearish-ness or Neutral
It’s also useful to pay attention to the trajectory of the indicator where, put simply:
+ 0 increasing away from mean (0) = Bullish
+ 0 decreasing towards mean (0) = Decreasing Bullish-ness
0 = Essentially neutral, but pay attention to the most recent trend
- 0 decreasing away from mean (0) = Bearish
- 0 increasing towards mean (0) = Decreasing Bearish-ness
Thank you for the support! We look forward to providing some more indicators that can hopefully make a positive impact on traders’ comfort within the markets & understanding of technical indicators.
Nadaraya-Watson Smoothers [LuxAlgo]The following tool smoothes the price data using various methods derived from the Nadaraya-Watson estimator, a simple Kernel regression method. This method makes use of the Gaussian kernel as a weighting function.
Users have the option to use a non-repainting as well as a repainting method, see the USAGE section for more information.
🔶 USAGE
🔹 Non Repainting
When Repainting Smoothing is disabled the returned indicator acts similarly to a regular causal moving average. This result could be described as an "endpoint Nadaraya-Watson estimator".
Unlike a regular moving average whose degree of smoothness is commonly determined by the length of its calculation window, the degree of smoothness of the proposed indicator is determined by the bandwidth setting, with a higher value returning smoother results.
In the above chart, a bandwidth value of 50 is used. An increasing value of the smoother is indicative of an uptrend, while a decreasing value is indicative of a downtrend.
🔹 Repainting
Non-causal smoothing methods have found low support from technical analysts because they tend to repaint. Yet, they can provide powerful insights such as estimating underlying trends in the price as well as seeing how far prices deviate from them. They can also make drawing certain patterns easier and can help see underlying structures in the price more clearly.
Using higher bandwidth values allows for estimating longer-term trends in the price.
Triangular labels highlight points where the direction of the estimator change. This allows for the identification of tops and bottoms in the underlying trend which can be compared to the actual price tops and bottoms.
Note that multiple labels can appear in real time, highlighting real-time changes in the estimator's direction. The most recent label on a series of labels is the first to appear. This can eventually be useful for the real-time predictive application of the estimator. However, it is not a usage we particularly recommend.
🔶 DETAILS
The Nadaraya-Watson estimator can be described as a series of weighted averages using a specific normalized kernel as a weighting function. For each point of the estimator at time t , the peak of the kernel is located at time t , as such the highest weights are attributed to values neighboring the price located at time t .
A lower bandwidth value would contribute toward a more important weighting of the price at a precise point and would as such less smooth results. In the case where our bandwidth is so small that the resulting kernel is just an impulse, we would get the raw price back.
However, when the bandwidth is sufficiently large, prices would be weighted similarly, thus resulting in a result closer to the price mean.
It can be interesting to note that due to the nature of the estimator and its weighting procedure, real-time results would not deviate drastically for points in the estimator near the center of the calculation window.
🔶 SETTINGS
Bandwidth : controls the bandwidth of the Gaussian kernel, with higher values returning smoother results.
Src : Input source of the kernel regression.
Repainting Smoothing : Determine if the smoothing method should repaint or not. If disabled the "endpoint Nadaraya-Watson estimator" is returned.
Outlier Detector with N-Sigma Confidence IntervalsA detrended series that oscilates around zero is obtained after first differencing a time series (i.e. subtracting the closing price for a candle from the one immediately before, for example). Hypothetically, assuming that every detrended closing price is independent of each other (what might not be true!), these values will follow a normal distribution with mean zero and unknown variance sigma squared (assuming equal variance, what is also probably not true as volatility changes over time for different pairs). After studentizing, they follow a Student's t-distribution, but as the sample size increases (back periods > 30, at least), they follow a standard normal distribution.
This script was developed for personal use and the idea is spotting candles that are at least 99% bigger than average (using N = 3) as they will cross the upper and lower confidence interval limits. N = 2 would roughly provide a 95% confidence interval.
Resampling Filter Pack [DW]This is an experimental study that calculates filter values at user defined sample rates.
This study is aimed to provide users with alternative functions for filtering price at custom sample rates.
First, source data is resampled using the desired rate and cycle offset. The highest possible rate is 1 bar per sample (BPS).
There are three resampling methods to choose from:
-> BPS - Resamples based on the number of bars.
-> Interval - Resamples based on time in multiples of current charting timeframe.
-> PA - Resamples based on changes in price action by a specified size. The PA algorithm in this script is derived from my Range Filter algorithm.
The range for PA method can be sized in points, pips, ticks, % of price, ATR, average change, and absolute quantity.
Then, the data is passed through one of my custom built filter functions designed to calculate filter values upon trigger conditions rather than bars.
In this study, these functions are used to calculate resampled prices based on bar rates, but they can be used and modified for a number of purposes.
The available conditional sampling filters in this study are:
-> Simple Moving Average (SMA)
-> Exponential Moving Average (EMA)
-> Zero Lag Exponential Moving Average (ZLEMA)
-> Double Exponential Moving Average (DEMA)
-> Rolling Moving Average (RMA)
-> Weighted Moving Average (WMA)
-> Hull Moving Average (HMA)
-> Exponentially Weighted Hull Moving Average (EWHMA)
-> Two Pole Butterworth Low Pass Filter (BLP)
-> Two Pole Gaussian Low Pass Filter (GLP)
-> Super Smoother Filter (SSF)
Downsampling is a powerful filtering approach that can be applied in numerous ways. However, it does suffer from a trade off, like most studies do.
Reducing the sample rate will completely eliminate certain levels of noise, at the cost of some spectral distortion. The lower your sample rate is, the more distortion you'll see.
With that being said, for analyzing trends, downsampling may prove to be one of your best friends!
Right Sided Ricker Moving Average And The Gaussian DerivativesIn general gaussian related indicators are built by using the gaussian function in one way or another, for example a gaussian filter is built by using a truncated gaussian function as filter kernel (kernel refer to the set weights) and has many great properties, note that i say truncated because the gaussian function is not supposed to be finite. In general the gaussian function is represented by a symmetrical bell shaped curve, however the gaussian function is parametric, and the user might adjust the position of the peak as well as the width of the curve, an indicator using this parametric approach is the Arnaud Legoux moving average (ALMA) who posses a length parameter controlling the filter length, a peak parameter controlling the position of the peak of the gaussian function as well as a width parameter, those parameters can increase/decrease the lag and smoothness of the moving average output.
However what about the derivatives of the gaussian function ? We don't talk much about them and thats a pity because they are extremely interesting and have many great properties as well, therefore in this post i'll present a low lag moving average based on the modification of the 2nd order derivative of the gaussian function, i believe this post will be extremely informative and i hope you will enjoy reading it, if you are not a math person you can skip the introduction on gaussian derivatives and their properties used as filter kernel.
Gaussian Derivatives And The Ricker Wavelet
The notion of derivative is continuous, so we will stick with the term discrete derivative instead, which just refer to the rate of change in the function, we have a change function in pinescript, and we will be using it to show an approximation of the gaussian function derivatives.
Earlier i used the term 2nd order derivative, here the derivative order refer to the order of differentiation, that is the number of time we apply the change function. For example the 0 (zeroth) order derivative mean no differentiation, the 1st order derivative mean we use differentiation 1 time, that is change(f) , 2nd order mean we use differentiation 2 times, that is change(change(f)) , derivates based on multiple differentiation are called "higher derivative". It will be easier to show a graphic :
Here we can see a normal gaussian function in blue, its scaled 1st order derivative in orange, and its scaled 2nd derivative in green, note that i use scaled because i used multiplication in order for you to see each curve, else it would have been less easy to observe them. The number of time a gaussian function derivative cross 0 is based on the order of differentiation, that is 2nd order = the function crossing 0 two times.
Now we can explain what is the Ricker wavelet, the Ricker wavelet is just the normalized 2nd order derivative of a gaussian function with inverted sign, and unlike the gaussian function the only thing you can change is the width parameter. The formula of the Ricker wavelet is show'n here en.wikipedia.org , where sigma is the width parameter.
The Ricker wavelet has this look :
Because she is shaped like a sombrero the Ricker wavelet is also called "mexican hat wavelet", now what would happen if we used a Ricker wavelet as filter kernel ? The response is that we would end-up with a bandpass filter, in fact the derivatives of the gaussian function would all give the kernel of a bandpass filter, with higher order derivatives making the frequency response of the filter approximate a symmetrical gaussian function, if i recall a filter using the first order derivative of a gaussian function would give a frequency response that is left skewed, this skewness is removed when using higher order derivatives.
The Indicator
I didn't wanted to make a bandpass filter, as lately i'am more interested in low-lag filters, so how can we use the Ricker wavelet to make a low-lag low-pass filter ? The response is by taking the right side of the Ricker wavelet, and since values of the wavelets are negatives near the border we know that the filter passband is non-monotonic, that is we know that the filter will have low-lag as frequencies in the passband will be amplified.
So taking the right side of the Ricker wavelet only mean that t has to be greater than 0 and linearly increasing, thats easy, however the width parameter can be tricky to use, this was already the case with ALMA, so how can we work with it ? First it can be seen that values of width needs to be adjusted based on the filter length.
In red width = 14, in green width = 5. We can see that an higher values of width would give really low weights, when the number of negative weights is too important the filter can have a negative group delay thus becoming predictive, this simply mean that the overshoots/undershoots will be crazy wild and that a great fit will be impossible.
Here two moving averages using the previous described kernels, they don't fit the price well at all ! In order to fix this we can simply define width as a function of the filter length, therefore the parameter "Percentage Width" was introduced, and simply set the width of the Ricker wavelet as p percent of the filter length. Lower values of percent width reduce the lag of the moving average, but lets see precisely how this parameter influence the filter output :
Here the filter length is equal to 100, and the percent width is equal to 60, the fit is quite great, lower values of percent width will increase overshoots, in fact the filter become predictive once the percent width is equal or lower to 50.
Here the percent width is equal to 50. Higher values of percent width reduce the overshoots, and a value of 100 return a filter with no overshoots that is suited to act as a lagging moving average.
Above percent width is set to 100. In order to make use of the predictive side of the filter, it would be great to introduce a forecast option, however this require to find the best forecast horizon period based on length and width, this is no easy task.
Finally lets estimate a least squares moving average with the proposed moving average, you know me...a percent width set to 63 will return a relatively good estimate of the LSMA.
LSMA in green and the proposed moving in red with percent width = 63 and both length = 100.
Conclusion
A new low-lag moving average using a right sided Ricker wavelet as filter kernel has been introduced, we have also seen some properties of gaussian derivatives. You can see that lately i published more moving averages where the user can adjust certain properties of the filter kernel such as curve width for example, if you like those moving averages you can check the Parametric Corrective Linear Moving Averages indicator published last month :
I don't exclude working with pure forms of gaussian derivatives in the future, as i didn't published much oscillators lately.
Thx for reading !
Roofing Filter [DW]This is an experimental study built on the concept of using roofing filters on price data proposed by John Ehlers.
Roofing filters are a type of bandpass filter conventionally used in HF radio receivers in the first IF stage to limit the frequency spectrum passed on to later stages in the receiver.
The goal in applying roofing filters to a price signal is to simultaneously attenuate high frequency noise and low frequency distortion to pass an oscillating signal with a nearly zero mean for analysis and/or further calculation.
In this study, there are three filter types to choose from:
-> Ehlers Roofing Filter, which passes data through a 2 pole high pass filter, then through a Super Smoother filter.
-> Gaussian Roofing Filter, which passes data through a 2 pole Gaussian high pass filter, then through a 2 pole Gaussian low pass filter.
-> Butterworth Roofing Filter, which passes data through a 2 pole Butterworth high pass filter, then through a 2 pole Butterworth low pass filter.
Each filter type has different amplitude and delay characteristics, so play around with each type and see which response suits your needs best.
There is an option to normalize the scale of the output as well. The normalization process in this script is computed by comparing positive and negative outputs to the filter's moving RMS value.
The resulting oscillator can be fed through numerous conventional indicators including Stochastic Oscillator, RSI, CCI, etc. to generate smoother, less distorted indicators for a clearer view of turning points.
Alternatively, it can also act as an indicator itself, as implied by the corresponding color scheme included in the script.
Although roofing filters are not conventionally used in the analysis of market data, applying such spectral analysis techniques may prove to be quite useful for the design of more efficient indicators and more reliable predictions.
Gaussian MFI BFThe signals are based on the Gaussian Channel calculated by Donovan Wall. Thanks also to Kiasaki for Rate of Change code.
Simply going long and short based on Gaussian channel was not consistent enough so I also included an MFI filter. We only go long if Money Flow Index is greater than the last candle (more money is flowing in than out). The opposite for short. Also employed Rate of Change function (white background) to avoid sideways market.
A 2% stop loss seems to be the most balanced for this strategy but can can altered in the settngs.
Also included a take-profit function but it seems this is best not implemented for this strategy, at least in the case of XBT/USD.
A derivative of The MFI is also plotted on the chart simply to compare the current candle with the last candle visually.
Background color:
Green = Long
Red = Short
White = No Trade
Double Gaussian Awesome Oscillator by KviateqThis is an experimental indicator based on Bill Williams' Awesome Oscillator, however this one is coded using Gaussian Smoothed MAs, and showing both short and long-term trend.
The bright line histogram shows short term trend, the columns show long term trend.
To be used the same way as Bill William's strategy for AO, with added confirmation of longer trend.
Gaussian Acceleration/Deceleration by KviateqBill Williams' AC (Acceleration/Deceleration), made using Gaussian-smoother Moving Averages and a 5-period EMA instead of the usual SMA.
Since Gaussian MA's are faster reacting than the typical SMAs values have been adjusted accordingly.
See also Gaussian Alligator and GaussianAO for a complete gaussian chaos trading system.
These scripts are made to honor Bill and his amazing work and my humble attempt at contributing to his work
Gaussian Awesome Oscillator by KviateqBill Williams' Awesome Oscillator, made using Gaussian-smoother Moving Averages.
Since Gaussian MA's are faster reacting than the typical SMAs values have been adjusted accordingly.
See also Gaussian Alligator and GaussianACDC for a complete gaussian chaos trading system.
These scripts are made to honor Bill and his amazing work and my humble attempt at contributing to his work
Gaussian Alligator by KviateqBill Williams' Alligator, made using Gaussian-smoother Moving Averages.
Since Gaussian MA's are faster reacting than the typical SMAs values have been adjusted accordingly.
See also GaussianAO and GaussianACDC for a complete gaussian chaos trading system.
These scripts are made to honor Bill and his amazing work and my humble attempt at contributing to his work
Gaussian distribution %sWith 4 Moving averages options, length input and source input this script will help you test so you can find the best moving average type and length according to the gaussian distribution theory.
Gaussian Distribution Theory:
68% of all data points fit within 1 Standard deviations of the mean
95% of all data points fit within 2 Standard deviations of the mean
99.7% of all data points fit within 3 Standard deviations of the mean
GuppyAdded over 20 ma types to experiment with ,while avoiding the traditional list and keeping compiling time adequate.
Its purely experimental ,published spontaneously for friend use and not as trading indicator.
Synoptic Advanced Bands w/GaussAdvanced 9 value band engine with Gaussian option. Includes ALMA, DEMA, EMA, Gauss, HMA, KAMA, LSMA, RMA, SMA, SMMA, TEMA, VWMA, WMA as options for the band engine.
Features:
Three color themes built in, switch between them with a drop down box in the inputs tab, customize them on the style tab.
Change source, length for band engine.
Five band modes, including Bollinger Mode, Custom Mode, Fibonacci Mode, Gaussian Mode, and Normal Mode.
Factor setting for normal (equidistant) and compounding in band calculation.
Offset option
Gaussian core can be shown at all times, even when using a non-Gaussian band engine, and includes reduced lag, and fast response mode, as well as the option to adjust the core multiplier and poles for the Gaussian calculations.
Bollinger settings can be locked to the band settings or set independently for standard deviation.
All custom settings for ALMA, KAMA, LSMA, DEMA, TEMA available including some new ones.
Custom alerts can be set within the inputs tab, then activated through the regular alerts dialog.
40 programmable presets for band settings.
Over 1000 configurations possible for the main settings, many many more if counting minor adjustments.
Great for support/resistance, predicting major moves, trend change/direction, targets, assessing volatility etc.
Access available, please message for more info. If you already have access and need help with configuration, or have a bug to report please get in touch with me.
Generalized Average Generic Gaussian Envelope mcbw_This is a moving average with a customizable gaussian kernel. You can shape your kernel by selecting your parameters in the settings window. This is not something that is immediately ready to mess with by just applying it on the chart, it is very useful for people who are researching indicators and developing new tools. To see the shape of your kernel you can plug it into google or wolfram. This indicator and the related ones are rather technical in nature, so feel free to comment any questions you may have and to see if anyone has asked your question.
Read more here:
Happy studying and enjoy your life!
2019 will be absolutely insane!
Moving Average Smoothness BenchmarkHey there!
This tool will help you to choose a moving average/filter that has the lowest lag throughout the whole history for the specified period.
What does it do?
It calculates the mean absolute errors for each moving average or filter and shows histogram with results. The lower error the lower lag of the moving average.
So, the best average will be at the end of the list of labels on the chart.
Settings
The main setting is a period for all moving averages.
Additionally, it allows to customize some multi-parametric moving average such as JMA, ALMA, McGinley Dynamic, Tillson's T3, REMA, Adaptive Laguerre Filter, Hampel Filter, Recursive Median Filter and Middle-High-Low MA.
NOTE : The results may vary on the different tickers and timeframes. This tool measures the performances on the current ticker and on the current timeframe.
Supported averages/filters (use short titles to match movings on the chart)
SMA, Simple MA
EMA, Exponential MA
WMA, Weighted (Linear) MA
RMA, Running MA (by J. Welles Wilder)
VWMA, Volume Weighted MA (by Buff P. Dormeier)
AHMA, Ahrens MA (by Richard D. Ahrens)
ALMA, Arnaud Legoux MA (by Arnaud Legoux and Dimitris Kouzis-Loukas)
ALF, Adaptive Laguerre Filter (by John F. Ehlers)
ARSI, Adaptive RSI
DEMA, Double Exponential MA (by Patrick G. Mulloy)
EDCF, Ehlers Distance Coefficient Filter (by John F. Ehlers)
EVWMA, Elastic Volume Weighted MA (by Christian P. Fries)
FRAMA, Fractal Adaptive MA (by John F. Ehlers)
HFSMA, Hampel Filter on Simple Moving Average
HFEMA, Hampel Filter on Exponential Moving Average
HMA, Hull MA (by Alan Hull)
HWMA, Henderson Weighted MA (by Robert Henderson)
IIRF, Infinite Impulse Response Filter (by John F. Ehlers)
JMA1, Jurik MA with power of 1 (by Mark Jurik)
JMA2, Jurik MA with power of 2 (by Mark Jurik)
JMA3, Jurik MA with power of 3 (by Mark Jurik)
JMA4, Jurik MA with power of 4 (by Mark Jurik)
LF, Laguerre Filter (by John F. Ehlers)
LMA, Leo MA (by ProRealCode' user Leo)
LSMA, Least Squares MA (Moving Linear Regression)
MD, McGinley Dynamic (by John R. McGinley)
MHLMA, Middle-High-Low MA (by Vitali Apirine)
REMA, Regularized Exponential MA (by Chris Satchwell)
RMF, Recursive Median Filter (by John F. Ehlers)
RMTA, Recursive Moving Trend Average (by Dennis Meyers)
SHMMA, Sharp Modified MA (by Joe Sharp)
SWMA, Sine Weighted MA
TEMA, Triple Exponential MA (by Patrick G. Mulloy)
TMA, Triangular MA
T3, (by Tim Tillson)
VIDYA, Variable Index Dynamic Average (by Tushar S. Chande)
ZLEMA, Zero Lag Exponential MA (by John F. Ehlers and Ric Way)
BF2, Butterworth Filter with 2 poles
BF3, Butterworth Filter with 3 poles
SSF2, Super Smoother Filter with 2 poles (by John F. Ehlers)
SSF3, Super Smoother Filter with 3 poles (by John F. Ehlers)
GF1, Gaussian Filter with 1 pole
GF2, Gaussian Filter with 2 poles
GF3, Gaussian Filter with 3 poles
GF4, Gaussian Filter with 4 poles
Good luck and Merry Christmas!