GKD-C Cycle-Period Adaptive, Linear Regression Slope [Loxx]Giga Kaleidoscope Cycle-Period Adaptive, Linear Regression Slope Oscillator is a Confirmation module included in Loxx's "Giga Kaleidoscope Modularized Trading System".
█ Giga Kaleidoscope Modularized Trading System
What is Loxx's "Giga Kaleidoscope Modularized Trading System"?
The Giga Kaleidoscope Modularized Trading System is a trading system built on the philosophy of the NNFX (No Nonsense Forex) algorithmic trading.
What is an NNFX algorithmic trading strategy?
The NNFX algorithm is built on the principles of trend, momentum, and volatility. There are six core components in the NNFX trading algorithm:
1. Volatility - price volatility; e.g., Average True Range, True Range Double, Close-to-Close, etc.
2. Baseline - a moving average to identify price trend
3. Confirmation 1 - a technical indicator used to identify trends
4. Confirmation 2 - a technical indicator used to identify trends
5. Continuation - a technical indicator used to identify trends
6. Volatility/Volume - a technical indicator used to identify volatility/volume breakouts/breakdown
7. Exit - a technical indicator used to determine when a trend is exhausted
How does Loxx's GKD (Giga Kaleidoscope Modularized Trading System) implement the NNFX algorithm outlined above?
Loxx's GKD v1.0 system has five types of modules (indicators/strategies). These modules are:
1. GKD-BT - Backtesting module (Volatility, Number 1 in the NNFX algorithm)
2. GKD-B - Baseline module (Baseline and Volatility/Volume, Numbers 1 and 2 in the NNFX algorithm)
3. GKD-C - Confirmation 1/2 and Continuation module (Confirmation 1/2 and Continuation, Numbers 3, 4, and 5 in the NNFX algorithm)
4. GKD-V - Volatility/Volume module (Confirmation 1/2, Number 6 in the NNFX algorithm)
5. GKD-E - Exit module (Exit, Number 7 in the NNFX algorithm)
(additional module types will added in future releases)
Each module interacts with every module by passing data between modules. Data is passed between each module as described below:
GKD-B => GKD-V => GKD-C(1) => GKD-C(2) => GKD-C(Continuation) => GKD-E => GKD-BT
That is, the Baseline indicator passes its data to Volatility/Volume. The Volatility/Volume indicator passes its values to the Confirmation 1 indicator. The Confirmation 1 indicator passes its values to the Confirmation 2 indicator. The Confirmation 2 indicator passes its values to the Continuation indicator. The Continuation indicator passes its values to the Exit indicator, and finally, the Exit indicator passes its values to the Backtest strategy.
This chaining of indicators requires that each module conform to Loxx's GKD protocol, therefore allowing for the testing of every possible combination of technical indicators that make up the six components of the NNFX algorithm.
What does the application of the GKD trading system look like?
Example trading system:
Backtest: Strategy with 1-3 take profits, trailing stop loss, multiple types of PnL volatility, and 2 backtesting styles
Baseline: Hull Moving Average as shown on chart
Volatility/Volume: Waddah Attar as shown on chart
Confirmation 1: Cycle-Period Adaptive, Linear Regression Slope Oscillator as shown on the chart above
Confirmation 2: Williams Percent Range
Continuation: Fisher Transform
Exit: Rex Oscillator
Each GKD indicator is denoted with a module identifier of either: GKD-BT, GKD-B, GKD-C, GKD-V, or GKD-E. This allows traders to understand to which module each indicator belongs and where each indicator fits into the GKD protocol chain.
Giga Kaleidoscope Modularized Trading System Signals (based on the NNFX algorithm)
Standard Entry
1. GKD-C Confirmation 1 Signal
2. GKD-B Baseline agrees
3. Price is within a range of 0.2x Volatility and 1.0x Volatility of the Goldie Locks Mean
4. GKD-C Confirmation 2 agrees
5. GKD-V Volatility/Volume agrees
Baseline Entry
1. GKD-B Baseline signal
2. GKD-C Confirmation 1 agrees
3. Price is within a range of 0.2x Volatility and 1.0x Volatility of the Goldie Locks Mean
4. GKD-C Confirmation 2 agrees
5. GKD-V Volatility/Volume agrees
6. GKD-C Confirmation 1 signal was less than 7 candles prior
Continuation Entry
1. Standard Entry, Baseline Entry, or Pullback; entry triggered previously
2. GKD-B Baseline hasn't crossed since entry signal trigger
3. GKD-C Confirmation Continuation Indicator signals
4. GKD-C Confirmation 1 agrees
5. GKD-B Baseline agrees
6. GKD-C Confirmation 2 agrees
1-Candle Rule Standard Entry
1. GKD-C Confirmation 1 signal
2. GKD-B Baseline agrees
3. Price is within a range of 0.2x Volatility and 1.0x Volatility of the Goldie Locks Mean
Next Candle:
1. Price retraced (Long: close < close or Short: close > close )
2. GKD-B Baseline agrees
3. GKD-C Confirmation 1 agrees
4. GKD-C Confirmation 2 agrees
5. GKD-V Volatility/Volume agrees
1-Candle Rule Baseline Entry
1. GKD-B Baseline signal
2. GKD-C Confirmation 1 agrees
3. Price is within a range of 0.2x Volatility and 1.0x Volatility of the Goldie Locks Mean
4. GKD-C Confirmation 1 signal was less than 7 candles prior
Next Candle:
1. Price retraced (Long: close < close or Short: close > close )
2. GKD-B Baseline agrees
3. GKD-C Confirmation 1 agrees
4. GKD-C Confirmation 2 agrees
5. GKD-V Volatility/Volume Agrees
PullBack Entry
1. GKD-B Baseline signal
2. GKD-C Confirmation 1 agrees
3. Price is beyond 1.0x Volatility of Baseline
Next Candle:
1. Price is within a range of 0.2x Volatility and 1.0x Volatility of the Goldie Locks Mean
3. GKD-C Confirmation 1 agrees
4. GKD-C Confirmation 2 agrees
5. GKD-V Volatility/Volume Agrees
█ Cycle-Period Adaptive, Linear Regression Slope Oscillator
What is Cycle-Period Adaptive, Linear Regression Slope Oscillator?
Cycle-Period Adaptive, Linear Regression Slope Oscillator is an oscillator that solves for the Linear Regression slope and turns it into an oscillator. This is a very simple calculation and uses one of Ehler's first implementations of his cycle period calculations. The output slope value is smoothed after calculation and before being drawn. This is a sort of momentum indicator and has a rich history with Forex traders around the world.
What is the Cycle Period?
The spectral content of the data are measured in a bank of contiguous filters as described in "Measuring Cycle Periods" in the March 2008 issue of Stocks & Commodities Magazine. The filter having the strongest output is selected as the current dominant cycle period. The cycle period is measured as the number of bars contained in one full cycle period.
What is Linear Regression?
In statistics, linear regression is a linear approach for modeling the relationship between a scalar response and one or more explanatory variables. The case of one explanatory variable is called simple linear regression ; for more than one, the process is called multiple linear regression.
Requirements
Inputs
Confirmation 1 and Solo Confirmation: GKD-V Volatility / Volume indicator
Confirmation 2: GKD-C Confirmation indicator
Outputs
Confirmation 2 and Solo Confirmation: GKD-E Exit indicator
Confirmation 1: GKD-C Confirmation indicator
Continuation: GKD-E Exit indicator
Additional features will be added in future releases.
Adaptive
Another New Adaptive Moving Average [CC]The New Adaptive Moving Average was created by Scott Cong (Stocks and Commodities Mar 2023) and this is a companion indicator to my previous script . This indicator still works off of the same concept as before with effort vs results but this indicator takes a slightly different approach and instead defines results as the absolute difference between the closing price and a closing price x bars ago. As you can see in my chart example, this indicator works great to stay with the current trend and provides either a stop loss or take profit target depending on which direction you are going in. As always, I use darker colors to show stronger signals and lighter colors to show normal signals. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicator scripts you would like to see me publish!
A New Adaptive Moving Average [CC]The New Adaptive Moving Average was created by Scott Cong (Stocks and Commodities Mar 2023) and his idea was to focus on the Adaptive Moving Average created by Perry Kaufman and to try to improve it by introducing a concept of effort vs results. In this case the effort would be the total range of the underlying price action since each bar is essentially a war of the bulls vs the bears. The result would be the total range of the close so we are looking for the highest close and lowest close in that same time period. This gives us an alpha that we can use to plug into the Kaufman Adaptive Moving Average algorithm which gives us a brand new indicator that can hug the price just enough to allow us to ride the stock up or down. I have color coded it to be darker colors when it is a strong signal and lighter colors when it is a normal signal. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like to see me publish!
Tailored-Custom Hamonic Patterns█ OVERVIEW
We have included by default 3 known Patterns. The Bat, the Butterfly and the Gartley. But have you ever wondered how effective other,
not yet known models could be? Don't ask yourself the question anymore, it's time to find out for yourself! You have the option to customize
your own Patterns with the Backtesting tool and set Retracement Ratios and Targets for your own Patterns. In addition to this, in order to determine
the Trend at a glance and make Pattern detection more efficient, we have linked the calculation of Patterns to Bands of several types to choose
from (Bollinger, Keltner, Donchian) that you can select from a drop-down menu in the settings and play with the Multiplier
and the Adaptive Length of the Patterns to see how it affects the success rate in the Backtesting table.
█ HOW DOES IT WORK?
- Harmonic Patterns
-Pattern Names, Colors, Style etc… Everything is customizable.
-Dynamic Adaptative Length with Min/Max Length.
- XAB/ABC Ratio
-Min/Max XAB/ABC Configurable Ratio for each Pattern to create your own Patterns.
(This is really the particular option of this Indicator, because it allows you to be able to Backtest in real time
after having played at configuring your own Ratios)
- Bands
-Contrary to the original logic of the HeWhoMustNotBeNamed script, here when the price breaks out of the upper Bands
(example, Bollinger band, Keltner Channel or Donchian Channel) , with a predetermined Minimum and Maximum Length and Multiplier, we can consider
the Trend to be Bearish (and not Bullish) and similarly when the price breaks down in the lower band, we can consider the Trend
to be Bullish (not Bearish) . We have also added the middle line of the Channels (which can be useful for 'Scalper' type Traders.
-The Length of the Bands Filter is directly related to the Dynamic Length of the Patterns.
-You can use a drop-down menu to select from the following Bands Filters :
SMA, EMA, HMA, RMA, WMA, VWMA, HIGH/LOW, LINREG, MEDIAN.
-Sticky and Adaptive Bands options has been included.
- Projections
-BD/CD Projection Ratio configurable for each Pattern.
(Projections are visible as Dotted Lines which we can choose to Extend or not)
- Targets
-Target, PRZ and Stop Levels are set to optimal values based on individual Patterns. (The PRZ Level corresponds to point D
of the detected Pattern so its value should always be 0) but you can change the Targets value (defined in %) as you wish.
Again here, you have the option to fully configure the Style and Extend the Lines or not.
- Backtesting Table
-As said previously, with the possibility of testing the Success Rate of each of the 3 Customizable Patterns,
this option is part of the logic of this Indicator.
- Alerts
-We originally believe that this Indicator does not even need Alerts. But we still decided to include at least one Alert
that you can set for when a new Pattern is detected.
█ NOTES
Thanks to HeWhoMustNotBeNamed for his permission to reuse some part of his zigzag scripts.
Remember to only make a decision once you are sure of your analysis. Good trading sessions to everyone and don't forget,
risk management remains the most important!
VHF Adaptive Linear Regression KAMAIntroduction
Heyo, in this indicator I decided to add VHF adaptivness, linear regression and smoothing to a KAMA in order to squeeze all out of it.
KAMA:
Developed by Perry Kaufman, Kaufman's Adaptive Moving Average (KAMA) is a moving average designed to account for market noise or volatility. KAMA will closely follow prices when the price swings are relatively small and the noise is low. KAMA will adjust when the price swings widen and follow prices from a greater distance. This trend-following indicator can be used to identify the overall trend, time turning points and filter price movements.
VHF:
Vertical Horizontal Filter (VHF) was created by Adam White to identify trending and ranging markets. VHF measures the level of trend activity, similar to ADX DI. Vertical Horizontal Filter does not, itself, generate trading signals, but determines whether signals are taken from trend or momentum indicators. Using this trend information, one is then able to derive an average cycle length.
Linear Regression Curve:
A line that best fits the prices specified over a user-defined time period.
This is very good to eliminate bad crosses of KAMA and the pric.
Usage
You can use this indicator on every timeframe I think. I mostly tested it on 1 min, 5 min and 15 min.
Signals
Enter Long -> crossover(close, kama) and crossover(kama, kama )
Enter Short -> crossunder(close, kama) and crossunder(kama, kama )
Thanks for checking this out!
--
Credits to
▪️@cheatcountry – Hann Window Smoohing
▪️@loxx – VHF and T3
▪️@LucF – Gradient
Adaptive RSI/Stochastic (ARSIS)As a trader, one of the most important aspects of technical analysis is identifying the dominant cycle of the market. The dominant cycle, also known as the market's "heartbeat," can provide valuable information on the current market trend and potential future price movements. One way to measure the dominant cycle is through the use of the MESA Adaptation - MAMA Cycle function, which is a part of the Dominant Cycle Estimators library.
I have developed an "Adaptive RSI/Stochastic" indicator that incorporates the MAMA Cycle function to provide more accurate and reliable signals. The indicator uses the MAMA Cycle function to calculate the period of the data, which is then used as a parameter in the calculation of the RSI and Stochastic indicators. By adapting the calculation of these indicators to the dominant cycle of the market, the resulting signals are more in tune with the current market conditions and can provide a more accurate representation of the current trend.
The MAMA Cycle function is a powerful tool that utilizes advanced mathematical techniques to accurately calculate the dominant cycle of the market. It takes into account the dynamic nature of the market and adapts the calculation of the period to the current conditions. The result is a more accurate and reliable measurement of the market's dominant cycle, which can be used to improve the performance of other indicators and trading strategies.
In conclusion, the Adaptive RSI/Stochastic indicator that I have developed, which incorporates the MAMA Cycle function, is a valuable tool for any trader looking to improve their technical analysis. By adapting the calculation of the RSI and Stochastic indicators to the dominant cycle of the market, the resulting signals are more in tune with the current market conditions and can provide a more accurate representation of the current trend.
Huge thank you to @lastguru for making this possible!
Elliot Wave Helper Table█ OVERVIEW
This indicator is intend to be helper to help Elliot Wave user to properly Elliot Wave tools according to correct degree such as 12345 or ABCWXY. The abbreviation changes according to timeframe.
█ FEATURES
1. Abbreviation degree adaptive to timeframe. Eg : Subminutte for 1 minute chart, etc.
2. Works for custom timeframe. Eg : Subminutte for 1 to 4 minute chart, etc.
3. Show reference table if necessary.
█ REFERENCE
Adaptive Elliot Wave Degree Chart
█ EXAMPLES / USAGES
Pair Prowler [CR]Pair Prowler by Cryptorhythms
Intro
Members needed a new scalping indicator, so of course I listened and delivered. Pair prowler is not crypto specific and can be applied to a variety of timeframes, markets, and tickers. Its meant to be a general purpose scalping aid providing actionable signals that help you time the market.
Description
This indicator relies upon various methods relataed to probabilities, statistics and data science to predict optimal times to buy or sell any given time series data. The goal was to create a tool that isolated short form trades, making it easier to follow a noisy market. With built in safety features to help trades make smart decision real time when it matters. The focus is making high hit rate uncorrelated returns to your base market.
There are still a large list of features to implement on the indicator. Most of the parameters will be made dynamic needed no changing or interaction from the user. This will also help prevent potential overfits from over-enthusiastic optimization =)
Private
This indicator is reserved for our members only to prevent decay as long as possible. You can view my signature at the bottom of this post for more information on membership. Membership seats are also capped!
Dont worry, there are 2 new free public scripts coming as well in the near future!
Musashi_Katana=== Musashi-Katana ===
This tool was designed to fit my particular trading style and personal theories about the "Alchemy of the markets" and ''Harmonic Structure'.
Context
When following a Technical approach to to surf the markets, there are teachings that must be understood before reaching a confort-zone, this usually happen the possible worst way by constant experimentation, it hurts.
Here few technical hints:
- Align High timeframes with lower timeframes:
This simple concept relax a lot complexity of finding of a trend bias. Musashi-Katana allows you to use technical indicator corresponding to specific timeframes, like daily weekly or yearly. They wont change when you change the chart's timeframe, its very useful as you know where you're standing in the long term, Its quite relaxing.
- Use volume:
The constant usage of volume will allow you to sync with the market's breathing. This shows you the mass of money flowing into and out of the market, is key if you want to understand momentum. This tool can help here, as it have multi-period vwaps. You can use yearly, monthly for swing trading, and even weekly if you enjoy scalping.
Useful stuff:
- You have access to baselines, AMA and Kijun-sen with the possibility of adding ATR bands.
- AMAs come as two lines strategies for different approaches, fast medium or slow.
- You can experiment with normal and multi timeframe moving averages and other trend tools.
Final Note
If used correctly Musashi-Katana is a very powerful tool, which makes no sense as there is no correct usage. Don't add everything at the same time, experiment, combine stuff, every market is different.
Backtest every possible strategy before using it, see what works and doesn't. This gives you a lot of peace, specially while you're at the tip of the spear surfing the markets
--> I personally use this in combination with 'Musashi_Slasher (Mometum+Volatility)', as it gives me volatility and momentum in a very precise way.
Adaptive VWAP Stdev BandsIntroduction
Heyo, here are some adaptive VWAP Standard Deviation Bands with nice colors.
I used Ehlers dominant cycle theories and ZLSMA smoothing to create this indicator.
You can choose between different algorithms to determine the dominant cycle and this will be used as reset period.
Everytime bar_index can be divided through the dominant cycle length and the result is zero VWAP resets if have chosen an adaptive mode in the settings.
The other reset event you can use is just a simple time-based event, e.g. reset every day.
Usage
I think people buy/sell when it reaches extreme zones.
Enjoy!
---
Credits to:
@SandroTurriate - VWAP Stdev Bands
@blackcat1402 - Dominant Cycle Analysis
@DasanC - Dominant Cycle Analysis
@veryfid - ZLSMA
(Sry, too lazy for linking)
I took parts of their code. Ty guys for your work! Just awesome.
Adaptive Fisherized CMFIntroduction
Heyo, here I made a normalized Chaikin Money Flow (CMF) indicator with Inverse Fisher Transform (IFT) and some smoothing techniques.
I had to normalize the indicator in order to fit it to the IFT range (-1 -> 1).
Moreover, the good old adaptive mode is also included in this indicator. It uses Ehlers superb dominant cycle techniques.
It also has divergence detection, several options for individualisation and doesn't repaint.
Usage
www.investopedia.com
Signals
CMF above 0 => bullish market
CMF below 0 => bearish market
(You can also use the inner bands instead of the zero line, to make these signals more precise)
Bullish regular/hidden divergence => long
Bearish regular/hidden divergence => short
Enjoy guys!
PS: I really would like to hear some feedback of you.
Adaptive Fisherized ROCIntroduction
Hello community, here I applied the Inverse Fisher Transform, Ehlers dominant cycle determination and smoothing methods on a simple Rate of Change (ROC) indicator
You have a lot of options to adjust the indicator.
Usage
The rate of change is most often used to measure the change in a security's price over time.
That's why it is a momentum indicator.
When it is positive, prices are accelerating upward; when negative, downward.
It is useable on every timeframe and could be a potential filter for you your trading system.
IMO it could help you to confirm entries or find exits (e.g. you have a long open, roc goes negative, you exit).
If you use a trend-following strategy, you could maybe look out for red zones in an in uptrend or green zones in a downtrend to confirm your entry on a pullback.
Signals
ROC above 0 => confirms bullish trend
ROC below 0 => confirms bearish trend
ROC hovers near 0 => price is consolidating
Enjoy! 🚀
Adaptive Fisherized Stochastic Center of GravityIntroduction
I modified the script "Fisher Stochastic Center of Gravity" of @DasanC for this indicator.
I added inverse Fisher transform, cycle period adaptiveness mode (Ehlers) and smoothing to it.
Moreover, I added buy and sell and beautified some stuff.
Lastly, it is also non-repainting!
Usage
This indicator can be used like a normal stochastic, but I don't recommend divergence analysis on it.
That fisherization stuff seems to make the graphs unuseable for that because it tries.
It works well on every timeframe I would say, but lower timeframes are recommended, because of the fast nature of stochastic.
Usually it does a good job on entry confirmation for reversals and trend continuation trades.
Recommended indicator to combine with this indicator is RSI cyclic smoothed v2 .
This is the best RSI version I know. In trending market it is recommended to look more on the inner bands and in flat market it is recommended to look more on the outer bands.
When RSI shows oversold and this indicator shows a crossover of the Center of Gravity plot through the bottom line -> Long entry is confirmed
When RSI shows overbought and this indicator shows a crossunder of the Center of Gravity plot through the top line -> Short entry is confirmed
Settings
The adaptive mode is enabled by default to give you straight the whole indicator experience.
The default settings are optimized, but should be changed depending on the market.
An example:
Market has a low volatility and a high momentum -> I want a slower/higher length to catch the slower new highs and lows.
Market has higher volatility and a low momentum, -> I want a faster/lower length to catch the faster new highs and lows
Signals
Crossover
Buy -> cog crossover signalLine
Sell -> cog crossunder signalLine
Overbought/Oversold Crossover
Buy -> cog crossover lowerBand
Sell -> cog crossunder lowerBand
I use this indicator a lot, because I don't know a better stochastic on this community here.
@DasanC did an awesome work with his version I used as base for this script.
Enjoy this indicator and let the profit roll! 🔥
Adaptive Parabolic SAR (APSAR) - [MYN]We took the code that we wrote in Myth Busting Strategy #6 to make it more profitable, specifically the timeframe adaptive Parabolic SAR logic and published this as a separate indicator to make it easier for others to use and adopt.
There really is no magic to this. This indicator basically just evaluates the timeframe and derives a multiplier that is applied to the PSAR Max attribute.
JFD-Adaptive, GKYZ-Filtered KAMA [Loxx]JFD-Adaptive, GKYZ-Filtered KAMA is a Kaufman Adaptive Moving Average with the option to make it Jurik Fractal Dimension Adaptive. This also includes a Garman-Klass-Yang-Zhang Historical Volatility Filter to reduce noise.
What is KAMA?
Developed by Perry Kaufman, Kaufman's Adaptive Moving Average ( KAMA ) is a moving average designed to account for market noise or volatility . KAMA will closely follow prices when the price swings are relatively small and the noise is low. KAMA will adjust when the price swings widen and follow prices from a greater distance. This trend-following indicator can be used to identify the overall trend, time turning points and filter price movements.
What is Jurik Fractal Dimension?
There is a weak and a strong way to measure the random quality of a time series.
The weak way is to use the random walk index ( RWI ). You can download it from the Omega web site. It makes the assumption that the market is moving randomly with an average distance D per move and proposes an amount the market should have changed over N bars of time. If the market has traveled less, then the action is considered random, otherwise it's considered trending.
The problem with this method is that taking the average distance is valid for a Normal (Gaussian) distribution of price activity. However, price action is rarely Normal, with large price jumps occuring much more frequently than a Normal distribution would expect. Consequently, big jumps throw the RWI way off, producing invalid results.
The strong way is to not make any assumption regarding the distribution of price changes and, instead, measure the fractal dimension of the time series. Fractal Dimension requires a lot of data to be accurate. If you are trading 30 minute bars, use a multi-chart where this indicator is running on 5 minute bars and you are trading on 30 minute bars.
What is Garman-Klass-Yang-Zhang Historical Volatility?
Yang and Zhang derived an extension to the Garman Klass historical volatility estimator that allows for opening jumps. It assumes Brownian motion with zero drift. This is currently the preferred version of open-high-low-close volatility estimator for zero drift and has an efficiency of 8 times the classic close-to-close estimator. Note that when the drift is nonzero, but instead relative large to the volatility , this estimator will tend to overestimate the volatility . The Garman-Klass-Yang-Zhang Historical Volatility calculation is as follows:
GKYZHV = sqrt((Z/n) * sum((log(open(k)/close( k-1 )))^2 + (0.5*(log(high(k)/low(k)))^2) - (2*log(2) - 1)*(log(close(k)/open(2:end)))^2))
Included
Alerts
Signals
Loxx's Expanded Source Types
Bar coloring
STD-Adaptive T3 [Loxx]STD-Adaptive T3 is a standard deviation adaptive T3 moving average filter. This indicator acts more like a trend overlay indicator with gradient coloring.
What is the T3 moving average?
Better Moving Averages Tim Tillson
November 1, 1998
Tim Tillson is a software project manager at Hewlett-Packard, with degrees in Mathematics and Computer Science. He has privately traded options and equities for 15 years.
Introduction
"Digital filtering includes the process of smoothing, predicting, differentiating, integrating, separation of signals, and removal of noise from a signal. Thus many people who do such things are actually using digital filters without realizing that they are; being unacquainted with the theory, they neither understand what they have done nor the possibilities of what they might have done."
This quote from R. W. Hamming applies to the vast majority of indicators in technical analysis . Moving averages, be they simple, weighted, or exponential, are lowpass filters; low frequency components in the signal pass through with little attenuation, while high frequencies are severely reduced.
"Oscillator" type indicators (such as MACD , Momentum, Relative Strength Index ) are another type of digital filter called a differentiator.
Tushar Chande has observed that many popular oscillators are highly correlated, which is sensible because they are trying to measure the rate of change of the underlying time series, i.e., are trying to be the first and second derivatives we all learned about in Calculus.
We use moving averages (lowpass filters) in technical analysis to remove the random noise from a time series, to discern the underlying trend or to determine prices at which we will take action. A perfect moving average would have two attributes:
It would be smooth, not sensitive to random noise in the underlying time series. Another way of saying this is that its derivative would not spuriously alternate between positive and negative values.
It would not lag behind the time series it is computed from. Lag, of course, produces late buy or sell signals that kill profits.
The only way one can compute a perfect moving average is to have knowledge of the future, and if we had that, we would buy one lottery ticket a week rather than trade!
Having said this, we can still improve on the conventional simple, weighted, or exponential moving averages. Here's how:
Two Interesting Moving Averages
We will examine two benchmark moving averages based on Linear Regression analysis.
In both cases, a Linear Regression line of length n is fitted to price data.
I call the first moving average ILRS, which stands for Integral of Linear Regression Slope. One simply integrates the slope of a linear regression line as it is successively fitted in a moving window of length n across the data, with the constant of integration being a simple moving average of the first n points. Put another way, the derivative of ILRS is the linear regression slope. Note that ILRS is not the same as a SMA ( simple moving average ) of length n, which is actually the midpoint of the linear regression line as it moves across the data.
We can measure the lag of moving averages with respect to a linear trend by computing how they behave when the input is a line with unit slope. Both SMA (n) and ILRS(n) have lag of n/2, but ILRS is much smoother than SMA .
Our second benchmark moving average is well known, called EPMA or End Point Moving Average. It is the endpoint of the linear regression line of length n as it is fitted across the data. EPMA hugs the data more closely than a simple or exponential moving average of the same length. The price we pay for this is that it is much noisier (less smooth) than ILRS, and it also has the annoying property that it overshoots the data when linear trends are present.
However, EPMA has a lag of 0 with respect to linear input! This makes sense because a linear regression line will fit linear input perfectly, and the endpoint of the LR line will be on the input line.
These two moving averages frame the tradeoffs that we are facing. On one extreme we have ILRS, which is very smooth and has considerable phase lag. EPMA has 0 phase lag, but is too noisy and overshoots. We would like to construct a better moving average which is as smooth as ILRS, but runs closer to where EPMA lies, without the overshoot.
A easy way to attempt this is to split the difference, i.e. use (ILRS(n)+EPMA(n))/2. This will give us a moving average (call it IE /2) which runs in between the two, has phase lag of n/4 but still inherits considerable noise from EPMA. IE /2 is inspirational, however. Can we build something that is comparable, but smoother? Figure 1 shows ILRS, EPMA, and IE /2.
Filter Techniques
Any thoughtful student of filter theory (or resolute experimenter) will have noticed that you can improve the smoothness of a filter by running it through itself multiple times, at the cost of increasing phase lag.
There is a complementary technique (called twicing by J.W. Tukey) which can be used to improve phase lag. If L stands for the operation of running data through a low pass filter, then twicing can be described by:
L' = L(time series) + L(time series - L(time series))
That is, we add a moving average of the difference between the input and the moving average to the moving average. This is algebraically equivalent to:
2L-L(L)
This is the Double Exponential Moving Average or DEMA , popularized by Patrick Mulloy in TASAC (January/February 1994).
In our taxonomy, DEMA has some phase lag (although it exponentially approaches 0) and is somewhat noisy, comparable to IE /2 indicator.
We will use these two techniques to construct our better moving average, after we explore the first one a little more closely.
Fixing Overshoot
An n-day EMA has smoothing constant alpha=2/(n+1) and a lag of (n-1)/2.
Thus EMA (3) has lag 1, and EMA (11) has lag 5. Figure 2 shows that, if I am willing to incur 5 days of lag, I get a smoother moving average if I run EMA (3) through itself 5 times than if I just take EMA (11) once.
This suggests that if EPMA and DEMA have 0 or low lag, why not run fast versions (eg DEMA (3)) through themselves many times to achieve a smooth result? The problem is that multiple runs though these filters increase their tendency to overshoot the data, giving an unusable result. This is because the amplitude response of DEMA and EPMA is greater than 1 at certain frequencies, giving a gain of much greater than 1 at these frequencies when run though themselves multiple times. Figure 3 shows DEMA (7) and EPMA(7) run through themselves 3 times. DEMA^3 has serious overshoot, and EPMA^3 is terrible.
The solution to the overshoot problem is to recall what we are doing with twicing:
DEMA (n) = EMA (n) + EMA (time series - EMA (n))
The second term is adding, in effect, a smooth version of the derivative to the EMA to achieve DEMA . The derivative term determines how hot the moving average's response to linear trends will be. We need to simply turn down the volume to achieve our basic building block:
EMA (n) + EMA (time series - EMA (n))*.7;
This is algebraically the same as:
EMA (n)*1.7-EMA( EMA (n))*.7;
I have chosen .7 as my volume factor, but the general formula (which I call "Generalized Dema") is:
GD (n,v) = EMA (n)*(1+v)-EMA( EMA (n))*v,
Where v ranges between 0 and 1. When v=0, GD is just an EMA , and when v=1, GD is DEMA . In between, GD is a cooler DEMA . By using a value for v less than 1 (I like .7), we cure the multiple DEMA overshoot problem, at the cost of accepting some additional phase delay. Now we can run GD through itself multiple times to define a new, smoother moving average T3 that does not overshoot the data:
T3(n) = GD ( GD ( GD (n)))
In filter theory parlance, T3 is a six-pole non-linear Kalman filter. Kalman filters are ones which use the error (in this case (time series - EMA (n)) to correct themselves. In Technical Analysis , these are called Adaptive Moving Averages; they track the time series more aggressively when it is making large moves.
Included
Bar coloring
Loxx's Expanded Source Types
Adaptive Two-Pole Super Smoother Entropy MACD [Loxx]Adaptive Two-Pole Super Smoother Entropy (Math) MACD is an Ehlers Two-Pole Super Smoother that is transformed into an MACD oscillator using entropy mathematics. Signals are generated using Discontinued Signal Lines.
What is Ehlers; Two-Pole Super Smoother?
From "Cycle Analytics for Traders Advanced Technical Trading Concepts" by John F. Ehlers
A SuperSmoother filter is used anytime a moving average of any type would otherwise be used, with the result that the SuperSmoother filter output would have substantially less lag for an equivalent amount of smoothing produced by the moving average. For example, a five-bar SMA has a cutoff period of approximately 10 bars and has two bars of lag. A SuperSmoother filter with a cutoff period of 10 bars has a lag a half bar larger than the two-pole modified Butterworth filter.Therefore, such a SuperSmoother filter has a maximum lag of approximately 1.5 bars and even less lag into the attenuation band of the filter. The differential in lag between moving average and SuperSmoother filter outputs becomes even larger when the cutoff periods are larger.
Market data contain noise, and removal of noise is the reason for using smoothing filters. In fact, market data contain several kinds of noise. I’ll group one kind of noise as systemic, caused by the random events of trades being exercised. A second kind of noise is aliasing noise, caused by the use of sampled data. Aliasing noise is the dominant term in the data for shorter cycle periods.
It is easy to think of market data as being a continuous waveform, but it is not. Using the closing price as representative for that bar constitutes one sample point. It doesn’t matter if you are using an average of the high and low instead of the close, you are still getting one sample per bar. Since sampled data is being used, there are some dSP aspects that must be considered. For example, the shortest analysis period that is possible (without aliasing)2 is a two-bar cycle.This is called the Nyquist frequency, 0.5 cycles per sample.A perfect two-bar sine wave cycle sampled at the peaks becomes a square wave due to sampling. However, sampling at the cycle peaks can- not be guaranteed, and the interference between the sampling frequency and the data frequency creates the aliasing noise.The noise is reduced as the data period is longer. For example, a four-bar cycle means there are four samples per cycle. Because there are more samples, the sampled data are a better replica of the sine wave component. The replica is better yet for an eight-bar data component.The improved fidelity of the sampled data means the aliasing noise is reduced at longer and longer cycle periods.The rate of reduction is 6 dB per octave. My experience is that the systemic noise rarely is more than 10 dB below the level of cyclic information, so that we create two conditions for effective smoothing of aliasing noise:
1. It is difficult to use cycle periods shorter that two octaves below the Nyquist frequency.That is, an eight-bar cycle component has a quantization noise level 12 dB below the noise level at the Nyquist frequency. longer cycle components therefore have a systemic noise level that exceeds the aliasing noise level.
2. A smoothing filter should have sufficient selectivity to reduce aliasing noise below the systemic noise level. Since aliasing noise increases at the rate of 6 dB per octave above a selected filter cutoff frequency and since the SuperSmoother attenuation rate is 12 dB per octave, the Super- Smoother filter is an effective tool to virtually eliminate aliasing noise in the output signal.
What are DSL Discontinued Signal Line?
A lot of indicators are using signal lines in order to determine the trend (or some desired state of the indicator) easier. The idea of the signal line is easy : comparing the value to it's smoothed (slightly lagging) state, the idea of current momentum/state is made.
Discontinued signal line is inheriting that simple signal line idea and it is extending it : instead of having one signal line, more lines depending on the current value of the indicator.
"Signal" line is calculated the following way :
When a certain level is crossed into the desired direction, the EMA of that value is calculated for the desired signal line
When that level is crossed into the opposite direction, the previous "signal" line value is simply "inherited" and it becomes a kind of a level
This way it becomes a combination of signal lines and levels that are trying to combine both the good from both methods.
In simple terms, DSL uses the concept of a signal line and betters it by inheriting the previous signal line's value & makes it a level.
Included:
Bar coloring
Alerts
Signals
Loxx's Expanded Source Types
Softmax Normalized Jurik Filter Histogram [Loxx]Softmax Normalized Jurik Filter Histogram is a Jurik Filter that is morphed into a normalized oscillator from -1 to 1.
What is the Softmax function?
The softmax function, also known as softargmax: or normalized exponential function, converts a vector of K real numbers into a probability distribution of K possible outcomes. It is a generalization of the logistic function to multiple dimensions, and used in multinomial logistic regression. The softmax function is often used as the last activation function of a neural network to normalize the output of a network to a probability distribution over predicted output classes, based on Luce's choice axiom.
What is Jurik Volty used in the Juirk Filter?
One of the lesser known qualities of Juirk smoothing is that the Jurik smoothing process is adaptive. "Jurik Volty" (a sort of market volatility ) is what makes Jurik smoothing adaptive. The Jurik Volty calculation can be used as both a standalone indicator and to smooth other indicators that you wish to make adaptive.
What is the Jurik Moving Average?
Have you noticed how moving averages add some lag (delay) to your signals? ... especially when price gaps up or down in a big move, and you are waiting for your moving average to catch up? Wait no more! JMA eliminates this problem forever and gives you the best of both worlds: low lag and smooth lines.
Included:
Bar coloring
Signals
Alerts
Loxx's Expanded Source Types
Fractal-Dimension-Index-Adaptive Trend Cipher Candles [Loxx]Fractal-Dimension-Index-Adaptive Trend Cipher Candles is a candle coloring indicator that shows both trend and trend exhaustion using Fractal Dimension Index Adaptivity. To do this, we first calculate the dynamic period outputs from the FDI algorithm and then we injection those period inputs into a correlation function that correlates price input price to the candle index. The closer the correlation is to 1, the lighter the green color until the color turns yellow, sometimes, indicating upward price exhaustion. The closer the correlation is to -1, the lighter the red color until it reaches Fuchsia color indicating downward price exhaustion. Green means uptrend, red means downtrend, yellow means reversal from uptrend to downtrend, fuchsia means reversal from downtrend to uptrend.
What is the Fractal Dimension Index?
The goal of the fractal dimension index is to determine whether the market is trending or in a trading range. It does not measure the direction of the trend. A value less than 1.5 indicates that the price series is persistent or that the market is trending. Lower values of the FDI indicate a stronger trend. A value greater than 1.5 indicates that the market is in a trading range and is acting in a more random fashion.
Included
Loxx's Expanded Source Types
Related indicators:
Adaptive Trend Cipher loxx]
CFB-Adaptive Trend Cipher Candles
Dynamic Zones Polychromatic Momentum Candles
RSI Precision Trend Candles
FDI-Adaptive, Jurik-Filtered, TMA w/ Price Zones [Loxx]FDI-Adaptive, Jurik-Filtered, TMA w/ Price Zones is a Triangular Moving Average that is Fractal Dimension Index Adaptive with Jurik Smoothing. You'll notice that this combination not only smooths out the signal but also catches bottoms better than other FIR digital filters. This is a multi-layered adaptive moving average. Price zones are calculated using a weighted range function. Future updates will included signals associated with these range bands. For now, however, these range bands serve as support and resistance, stop-loss or take profit, or indicators of market reversal.
What is the Triangular Moving Average
The Triangular Moving Average is basically a double-smoothed Simple Moving Average that gives more weight to the middle section of the data interval. The TMA has a significant lag to current prices and is not well-suited to fast moving markets. TMA = SUM ( SMA values)/ N Where N = the number of periods.
What is the Fractal Dimension Index?
The goal of the fractal dimension index is to determine whether the market is trending or in a trading range. It does not measure the direction of the trend. A value less than 1.5 indicates that the price series is persistent or that the market is trending. Lower values of the FDI indicate a stronger trend. A value greater than 1.5 indicates that the market is in a trading range and is acting in a more random fashion.
What is Jurik Volty used in the Juirk Filter?
One of the lesser known qualities of Juirk smoothing is that the Jurik smoothing process is adaptive. "Jurik Volty" (a sort of market volatility ) is what makes Jurik smoothing adaptive. The Jurik Volty calculation can be used as both a standalone indicator and to smooth other indicators that you wish to make adaptive.
What is the Jurik Moving Average?
Have you noticed how moving averages add some lag (delay) to your signals? ... especially when price gaps up or down in a big move, and you are waiting for your moving average to catch up? Wait no more! JMA eliminates this problem forever and gives you the best of both worlds: low lag and smooth lines.
Included:
Bar coloring
Signals
Alerts
FDI-Adaptive Supertrend w/ Floating Levels [Loxx]FDI-Adaptive Supertrend w/ Floating Levels is a Fractal Dimension Index adaptive Supertrend indicator. This allows Supertrend to better adaptive to volatility of the market. This also includes floating levels that act as support and resistance, stop loss or take profit, or indication of market reversal. Additional signal types will be added in the future based on these floating levels.
What is the Fractal Dimension Index?
The goal of the fractal dimension index is to determine whether the market is trending or in a trading range. It does not measure the direction of the trend. A value less than 1.5 indicates that the price series is persistent or that the market is trending. Lower values of the FDI indicate a stronger trend. A value greater than 1.5 indicates that the market is in a trading range and is acting in a more random fashion.
What is the Supertrend?
Supertrend indicator was created by Olivier Seban to work on different time frames. It works for futures , forex, and equities. It is used in 15 minutes, hourly, weekly, and daily charts . Based on the parameters of multiplier and period, the indicator normally uses 3 for multiplier and 7 for the ATR period as default values. Average True Range is represented by the number of days while the multiplier is the value by which the range is multiplied.
Included:
Bar coloring
Alerts
Signals
FDI-Adaptive Fisher Transform [Loxx]FDI-Adaptive Fisher Transform is a Fractal Dimension Adaptive Fisher Transform indicator.
What is the Fractal Dimension Index?
The goal of the fractal dimension index is to determine whether the market is trending or in a trading range. It does not measure the direction of the trend. A value less than 1.5 indicates that the price series is persistent or that the market is trending. Lower values of the FDI indicate a stronger trend. A value greater than 1.5 indicates that the market is in a trading range and is acting in a more random fashion.
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
End-pointed SSA of FDASMA [Loxx]End-pointed SSA of FDASMA is a modification of Fractal-Dimension-Adaptive SMA (FDASMA) using End-Pointed Singular Spectrum Analysis. This is a multilayer adaptive indicator.
What is the Fractal Dimension Index?
The goal of the fractal dimension index is to determine whether the market is trending or in a trading range. It does not measure the direction of the trend. A value less than 1.5 indicates that the price series is persistent or that the market is trending. Lower values of the FDI indicate a stronger trend. A value greater than 1.5 indicates that the market is in a trading range and is acting in a more random fashion.
See here for more info:
Fractal-Dimension-Adaptive SMA (FDASMA) w/ DSL
What is Singular Spectrum Analysis ( SSA )?
Singular spectrum analysis ( SSA ) is a technique of time series analysis and forecasting. It combines elements of classical time series analysis, multivariate statistics, multivariate geometry, dynamical systems and signal processing. SSA aims at decomposing the original series into a sum of a small number of interpretable components such as a slowly varying trend, oscillatory components and a ‘structureless’ noise. It is based on the singular value decomposition ( SVD ) of a specific matrix constructed upon the time series. Neither a parametric model nor stationarity-type conditions have to be assumed for the time series. This makes SSA a model-free method and hence enables SSA to have a very wide range of applicability.
For our purposes here, we are only concerned with the "Caterpillar" SSA . This methodology was developed in the former Soviet Union independently (the ‘iron curtain effect’) of the mainstream SSA . The main difference between the main-stream SSA and the "Caterpillar" SSA is not in the algorithmic details but rather in the assumptions and in the emphasis in the study of SSA properties. To apply the mainstream SSA , one often needs to assume some kind of stationarity of the time series and think in terms of the "signal plus noise" model (where the noise is often assumed to be ‘red’). In the "Caterpillar" SSA , the main methodological stress is on separability (of one component of the series from another one) and neither the assumption of stationarity nor the model in the form "signal plus noise" are required.
"Caterpillar" SSA
The basic "Caterpillar" SSA algorithm for analyzing one-dimensional time series consists of:
Transformation of the one-dimensional time series to the trajectory matrix by means of a delay procedure (this gives the name to the whole technique);
Singular Value Decomposition of the trajectory matrix;
Reconstruction of the original time series based on a number of selected eigenvectors.
This decomposition initializes forecasting procedures for both the original time series and its components. The method can be naturally extended to multidimensional time series and to image processing.
The method is a powerful and useful tool of time series analysis in meteorology, hydrology, geophysics, climatology and, according to our experience, in economics, biology, physics, medicine and other sciences; that is, where short and long, one-dimensional and multidimensional, stationary and non-stationary, almost deterministic and noisy time series are to be analyzed.
Included:
Bar coloring
Alerts
Signals
Loxx's Expanded Source Types