Ehlers Directional Movement Hann Window Indicator [CC]The Directional Movement Hann Window Indicator was created by John Ehlers (Stocks and Commodities Dec 2021 pgs 17-18) and this is his updated version of the classic Directional Movement indicator created by J. Welles Wilder. Ehlers uses the Hann Window Filtering after using an exponential moving average to smooth the classic directional movement indicator. This helps significantly with the lag and lack of smoothing which are both issues with the classic indicator. I have included strong buy and sell signals in addition to the normal ones so strong signals are darker in color and normal signals are lighter in color. 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!
Ehlers
[DSPrated] Modified EMD for swing tradeModified Ehlers Empirical Mode Decomposition indicator for swing trade based on Butterworth 2nd order IIR filter
Description
This script is inspired by John Ehlers' TECHNICAL PAPERS - Truncating Indicators and Empirical Mode Decomposition. But instead of detecting trend it applies to finding swing regions.
Also here is suggested canonical DSP approach for designing coefficients for Butterworth 2nd order IIR filters - bandpass and lowpass.
Besides, truncated IIR filter with configurable length parameter is used. It worth mentioning, that although truncated filter is more robust than original IIR, it losses specified properties (bandpass) the more, the less is length parameter.
Butterworth Bandpass Infinite Impulse Response (IIR) Filter
This is the 2nd order Butterworth Bandpass Infinite Impulse Response (IIR) Filter based on the transform from the 1st order lowpass
Based on the example 8.8 on p476 from book Digital Signal Processing: A Practical Approach 2nd Edition by Emmanuel C. Ifeachor (Author), Barrie W. Jervis (Author)
It differs from Ehlers BandPass Filter only in the way you initialize input parameters. Here you can define cutoff periods of region of interest. For example on a timeframe, where one bar equals 1 hour you can define periods 18 and 22, which mean you'll see the swing intensity of price movement components within specified range.
Parameters
Source
Period 1 - cutoff period of bandpass begining
Period 2 - cutoff period of the end of bandpass
length - IIR truncation length
Concept of usage
Within specified bandpass this indicator eliminates the Trend line according to Ehlers EMD. The bandpass periods is recommended to choose accordingly to personal comfortable trading style and timeframe.
The trendline painted with 3 colors depending of the next modes:
up tend - green
cycling - black
downtrend - red
So the buy signal is generated when trend line in cycling mode and filtered component reaches it local minimum.
And the sell signal is generated when trend line in cycling mode and filtered component reaches it local maximum.
Secure long and short zones marked with color.
---
// TO DO
// - compare truncated and full version using signal generators
// - apply zero lag filter modification fordetectig ternd and swing peroids
// - implement strategy scripts
// - implement somewhat "true" EMD with sevral IMFs(intrinsic mode function)
// - better description?
// - parameter optimization
---
Please, feel free to report any issues and improvement suggestions.
Ehlers Stochastic Relative Vigor Index [CC]The Stochastic Relative Vigor Index was created by John Ehlers (Cybernetic Analysis For Stocks And Futures pgs 84-89) and this of course is very similar to the Ehlers Fisher Stochastic Relative Vigor Index I just published. In hindsight I probably should have published this one first but just like with the other script this is a stochastic version of a Relative Vigor Index and I added some smoothing to make buy and sell signals clearer. There are several ways to identify buy and sell signals but generally in the long term it is a buy signal when the indicator is below the oversold line and is moving up and in the short term when the indicator is above it's trigger line which is what I coded the buy and sell signals to follow. Buy when the line is green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Deviation Scaled Super Smoother [CC]The Deviation Scaled Super Smoother was created by John Ehlers and this is an excellent moving average that changes direction very quickly and can keep up with the current underlying trend. This indicator works by applying a Hann Windowed Moving Average to the stock's momentum and scaling that by the Root Mean Square and then using that value in the input for a Super Smoother . I have included strong buy and sell signals in addition to normal ones so lighter colors are normal signals and darker colors are strong ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Fisher Stochastic Relative Vigor Index [CC]The Fisher Stochastic Relative Vigor Index was created by John Ehlers (Cybernetic Analysis For Stocks And Futures pgs 101-104) and this is a many layered indicator created from his original Relative Vigor Index turned into a stochastic and then performing a Fisher transform on the results. I have included extra smoothing to provide clearer buy and sell signals as well as normal and strong buy and sell signals. As always strong signals are darker in color and normal signals are lighter in color. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Variable Index Dynamic Average [CC]The Variable Index Dynamic Average was created by Tushar Chande and this is a variation of that original formula created by John Ehlers. As you can see I have included the default Vidya from a script by @everget and as you can see the Ehlers version is able to follow the price much closer. I have included strong buy and sell signals in addition to normal ones and so darker colors are strong signals and lighter colors are normal ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Cycle Period [CC]The Cycle Period was created by John Ehlers and this is yet another version that shows how to calculate the current cycle period which is the approximate amount of days between a current peak or valley and the next peak or valley. I would not recommend this for trading since it is more for informational use only but I would try experimenting with this output to be used with another indicator as an input length. I have included strong buy and sell signals in addition to normal ones so strong signals are darker in color and normal signals are lighter in color.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Kaufman Adaptive Moving Average [CC]The Kaufman Adaptive Moving Average was created by Perry Kaufman and this is a variation of that original formula created by John Ehlers. I have included a side by side with an original script (blue line) done by @HPotter that shows that Ehlers version is slightly more reactive compared to the original version. I have included strong buy and sell signals in addition to normal ones and so darker colors are strong signals and lighter colors are normal ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Mesa Spectrum Dominant Cycle [CC]The Mesa Spectrum Dominant Cycle was created by John Ehlers and this is the foundation for many indicators he created that would later follow. This is his updated version of his original Mesa algorithm and I do not recommend this indicator as a stand alone for trading. This is more of an informational indicator that will tell you the current dominant cycle period which is the approximate period between peaks and valleys in the underlying data. I have color coded buy signals just in case with both strong and normal signals. Darker colors are strong and lighter colors are normal. Buy when the line is green and sell when it is red.
Let me know if there are any other indicators you would like to see me publish!
Ehlers Average Error Filter [CC]The Average Error Filter was created by John Ehlers and this is a variation of a Zero Lag Exponential Moving Average that uses a Super Smoother to filter out the noise and then uses a second Super Smoother of the difference between the current price and the filtered data. This works well as a trendline and does give out a few false signals like all indicators inevitably do but most signals do a good job of keeping up with the trend and providing clear entries and exits when the trend changes. I have included strong buy and sell signals in addition to normal ones so like always darker colors are strong signals and lighter colors are normal ones. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Error Correcting Exponential Moving Average [CC]The Error Correcting Exponential Moving Average was created by John Ehlers and Ric Way (Stocks & Commodities V. 28:11 (30-35)) and this is an excellent moving average that accurately identifies the trend and sticks with the price during trends or choppy periods pretty well. It looks back to find the best gain setting for each day that returns the smallest difference between the current price and the ema based on the gain setting and uses that day's info in it's total calculations and if there is a zero gain for the day then it is just a classic ema. I have included strong buy and sell signals in addition to normal ones so lighter colors are normal and darker colors are strong. 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!
Ehlers Moving Average Difference Hann Indicator [CC]The Moving Average Difference Hann Indicator was created by John Ehlers (Stocks and Commodities Nov 2021) and this is an improved variation of his Moving Average Difference Indicator that uses smoothing from his Hann Windowing Indicator to provide smoother buy and sell signals. As for how this indicator works it is an improved version of the classic MACD indicator which of course takes a difference between two exponential moving averages. I have included strong buy and signals in addition to normal ones so lighter colors are normal signals and darker colors are strong signals. 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!
Ehlers High Pass Filter [CC]The High Pass Filter was created by John Ehlers and I would define this indicator as both a momentum indicator but also a predictor indicator. This does a pretty good job of predicting future price action even though I have double smoothed it to provide clear buy and sell signals. I will be publishing quite a few more Ehlers indicators very soon so stay tuned. This indicator can be interpreted in a few different ways but most importantly it is a mid to long term sell signal when the indicator falls below the zero line and vice versa. It also falls below the zero line when the underlying price data starts losing momentum so it can be used also as a price reversal. I have included strong buy and sell signals in addition to normal ones so darker colors are strong signals and lighter colors are normal signals. 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!
PSAR + EMA/TEMA/RSI/OBVThe Parabolic Stop-and-Reservse (PSAR) is a trend indicator, intended to capture reversal signals and show entry and exit points. The PSAR is bullish when the PSAR is below the candle body (usually indicated by a dot) and bearish when the PSAR is above the candle body. The PSAR generally only moves in the direction of the trend, making it useful for markets with an upward or downward trend, as well as swing markets. It is weaker when the market it sideways, as it can be prone to frequent flips (bull-to-bear or vice versa) in markets where a predominant trend is not present.
In order to combat the tendency for rapid swings in the PSAR, it is commonly paired with a second indicator. Often, this is a moving average (MA) to confirm the PSAR signal. Here is a common example:
PSAR + 2 EMAs: A trade would consider entering long when the PSAR is bullish and the fast EMA is above the short EMA.
PSAR + 3 EMAs: As above, but the trader could also add a very long EMA (200, for example) and use that as an additional filter.
In addition to using EMA, other MAs can be used and may be more appropriate to certain instruments and timeframes. Using TEMA, for example, may result in less lag but introduce more noise. Likewise, the Ehler's MAMA is an option.
Some traders use other indicators as PSAR confirmation signals, such as the relative strength index (RSI) on on-balance volume (OBV). The strategy is similar:
bullish PSAR + RSI oversold = consider long entry
bullish PSAR + OBV oscillator > 0 = consider long entry
The strategy presented here is based on my PSAR + EMA + TEMA study. Any of the above strategies are supported by this script:
1. The PSAR is the primary signal.
2. Confirmation is provided by any of the following: EMA , TEMA , Ehler's MAMA , RSI , or OBV.
3. You may use a third EMA (set to 200 as the default) to filter entries -- if used, the strategy will only show signals if the price is above the third (additional) EMA .
For example, a normal long signal would be a bullish PSAR + fast EMA > slow EMA + price > ema 200.
In addition, you may use a SL, which is set to the PSAR dots shown. You may also limit the backtesting dates. (Please note in the chart above, I do not have a limit on the trading dates. I believe this exaggerates the success of the strategy, but the house rules demand I not limit the timeframe to show you a more accurate picture.)
Ehlers Moving Average Difference Indicator [CC]The Moving Average Difference Indicator was created by John Ehlers (Stocks and Commodities Oct 2021 pg 23) and this is essentially his version of the famous MACD indicator. He calls this indicator the "thinking mans" MACD because his thought process for creating the lengths is based on half of the period of the dominant cycle. These are the default lengths that he created but feel free to test it out with your own variations and please let me know if you come up with a better one. I'm sorry for my long delay from TV. Sometimes I just need to step away and collect my thoughts before I burn myself out with the many scripts I keep publishing daily. I will try to get back into publishing daily again because I have a personal backlog of over 50 scripts ready to go that I haven't published yet. As always I have included strong buy and sell signals in addition to normal ones so darker colors are strong and lighter colors are normal. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Cycle Amplitude [CC]The Cycle Amplitude was created by John Ehlers (Trend Modes and Cycle Modes) and this indicator wasn't meant to give buy and sell signals by itself but I'm publishing this open source script in case someone comes up with a cool way to use this indicator for buy and sell signals. This indicator essentially tells you the distance between the peaks from the Cycle BandPass Filter and I will be including the last script tomorrow most likely. I'm reusing the same exact buy and sell signals from the cycle bandpass filter so if you have any questions then feel free to refer to the link I posted.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Cycle BandPass Filter [CC]The Cycle BandPass Filter was created by John Ehlers (Cycle Modes and Trend Modes) and this is an alternate to the default BandPass Filter by changing some settings. This will be another series I will be introducing showing some indicators created by Ehlers and that didn't get much attention. This identifies the underlying cycle in the price data and these indicators aren't very common so I want to introduce more of these to tv. Buying and selling with these indicators can be a bit tricky but overall what Ehlers recommends is to buy at the lowest point and sell at the highest point to capture the underlying cycle. I have included strong buy and sell signals as darker colors and normal signals as lighter colors. Buy when the line turns green and sell when it turns red.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Instantaneous Phase Dominant Cycle [CC]The Instantaneous Phase Dominant Cycle was created by John Ehlers (Stocks & Commodities V. 18:3 (16-27)) and this is one of many similar indicators that I will be publishing from Ehlers in the next few months that calculate the current dominant cycle period. The cycle period can be used in multiple ways but generally this means that if the stock is currently at a low then the current cycle period will tell you when the next lowest low will get hit or vice versa. This is also useful for using this cycle period as an input for other indicators to provide a very good adaptive length. Let me know how you wind up using these indicators in your daily trading. I have included the same buy and sell signals from my recent Hilbert Transform and so 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!
Ehlers Hilbert Transform [CC]The Hilbert Transform was created by John Ehlers (Stocks & Commodities V. 18:3 (16-27)) and this indicator can work pretty well as a trend confirmation. This essentially transforms the underlying price data into a soundwave and when you compare the two (blue is positive and red is negative) then it provides fairly clear buy and sell signals. Ehlers did warn in his original article that this indicator has a lag of 4 bars so you have to keep that in mind. I have found that this indicator works pretty well when you buy when the blue line goes over the red line and sell when the blue lines hits the zero line. You could also ignore the red line and buy when the blue line crosses over the zero line and sell when it crosses under. Let me know how you wind up using this indicator in your trading.
Let me know if there are any other scripts you would like to see me publish!
Ehlers Squelch Indicator [CC]The Squelch Indicator was created by John Ehlers (Stocks & Commodities V. 18:9 (42-46)) and this indicator is a variation of his Market Mode Indicator and its purpose is the same as in it determines if the market is trending or in a choppy market. If this indicator is at the 1 level then this means the market is trending and if it is at 0 then the market is choppy. I would recommend to adjust the squelch variable to find a setting that works well for you. If you want to avoid more choppy markets then adjust the squelch variable to a lower amount and vice versa. I have included basic buy and sell signals so 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!
Ehlers Simple Window Indicator [CC]The Simple Window Indicator was created by John Ehlers (Stocks and Commodities Sep 2021) and this is the last of the 4 new indicators that he published in the latest issue of Stocks & Commodities. Since these are all part of a series, the idea behind each indicator is the exact same. The only difference is of course the calculation for each indicator. This script is different mostly because it is extremely noisy in comparison so I had to smooth it twice to provide clear buy and sell signals. Window functions are used in digital signal processing to filter out noise and the end result is an oscillator that centers around the 0 line. The easy way to understand these indicators that I will be publishing and those are that when they are above 0, it usually means an uptrend and below 0 then a downtrend. For more immediate signals, I have included both normal and strong buy and sell signals so darker colors for strong signals and lighter colors for normal signals. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like me to publish!
Ehlers Triangle Window Indicator [CC]The Triangle Window Indicator was created by John Ehlers (Stocks and Commodities Sep 2021) and this is one of 4 new indicators that he published in the latest issue of Stocks & Commodities and I will be publishing the last one tomorrow. Since these are all part of a series, the idea behind each indicator is the exact same. The only difference is of course the calculation for each indicator. Window functions are used in digital signal processing to filter out noise and the end result is an oscillator that centers around the 0 line. The easy way to understand these indicators that I will be publishing and those are that when they are above 0, it usually means an uptrend and below 0 then a downtrend. For more immediate signals, I have included both normal and strong buy and sell signals so darker colors for strong signals and lighter colors for normal signals. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like me to publish!
Ehlers Hamming Window Indicator [CC]The Hamming Window Indicator was created by John Ehlers (Stocks and Commodities Sep 2021) and this is one of 4 new indicators that he published in the latest issue of Stocks & Commodities and I will be publishing the other 2 in the next few days. Since these are all part of a series, the idea behind each indicator is the exact same. The only difference is of course the calculation for each indicator. Window functions are used in digital signal processing to filter out noise and the end result is an oscillator that centers around the 0 line. The easy way to understand these indicators that I will be publishing and those are that when they are above 0, it usually means an uptrend and below 0 then a downtrend. For more immediate signals, I have included both normal and strong buy and sell signals so darker colors for strong signals and lighter colors for normal signals. Buy when the line turns green and sell when it turns red.
Let me know if there are any other indicators you would like me to publish!