Ehlers Modified Relative Strength Index [CC]The Modified Relative Strength Index was created by John Ehlers (Cycle Analytics For Traders pgs 87-88) and this is a typical RSI that uses his roofing filter as the input. He smooths it with his own super smoother filter to provide signals. This indicator is extremely reactive and works in cycles so keep that in mind. I haven't been able to come up with clear buy and sell signals at this point so let me know if you any suggestions but I'm publishing the code to complete my goal of publishing all of his work one day. I will be publishing a bunch of Ehlers scripts in the next few weeks so stay tuned. What I recommend for buy and sell signals at this point are to buy when the indicator goes below the oversold line and starts going up and sell when the indicator goes below the oversold line a second time. Vice versa for sell signals.
Let me know if there are any other scripts you would like to see me publish!
Roofingfilter
[blackcat] L2 Ehlers Roofing Filter IndicatorLevel: 2
Background
John F. Ehlers introuced Roofing Filter Indicator in his "Cycle Analytics for Traders" chapter 7 on 2013.
Function
The roofing filter does an excellent job of using only the frequency components between its upper and lower critical periods. All that needs to be done to create an indicator from the roofing filter is to add more generality by allowing the high-pass and low-pass critical periods be supplied as indicator inputs. The two high-pass filters have been implemented as a single two-pole high-pass filter. The ideal time to buy is when the cycle is at a trough, and the ideal time to exit a long position or to sell short is when the cycle is at a peak. These conditions are flagged by the filter crossing itself delayed by one bar, and are included as part of the indicator.
Key Signal
Filt --> Roofing Filter Indicator fast line
Trigger --> Roofing Filter Indicator slow line
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
Remarks
The 43th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
[blackcat] L2 Ehlers Zero Mean Roofing FilterLevel: 2
Background
John F. Ehlers introuced Zero Mean Roofing Filter in his "Cycle Analytics for Traders" chapter 7 on 2013.
Function
The HP-LP Roofing Filter output still contains all of these frequency components. The only way we can reduce the effect of these lower-frequency components is to introduce another high-pass filter, adding an additional 6 dB per octave roll-off, so that the net effect of the filter is as originally surmised. Dr. Ehlers have added Filt2 to the code in "Zero Mean Roofing Filter". Note that in addition to establishing a nominally zero mean, removal of the longer cycle components caused by spectral dilation removes lag from the roofing filter output.
Key Signal
Filt2 --> Zero Mean Roofing Filter fast line
Trigger --> Zero Mean Roofing Filter slow line
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
Remarks
The 42th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
[blackcat] L2 Ehlers HP-LP Roofing FilterLevel: 2
Background
John F. Ehlers introuced HP-LP Roofing Filter in his "Cycle Analytics for Traders" chapter 7 on 2013.
Function
A “roofing filter” can be used to limit the frequency content of an input before proceeding to construct an indicator. The roofing filter is composed of a highpass filter that passes only frequency components whose periods are shorter than 48 bars, for example. It also is composed of a SuperSmoother filter that passes frequency components whose periods are longer than 10 bars. Thus, the roofing filter is a wide bandwidth band-pass filter that passes only frequency components whose periods fall between 10 bars and 48 bars. This, by itself, is a simple indicator.
While the roofing filter indicator wiggles in proportion to the wiggles in the price data as you would expect, it is noticeable that the indicator is above zero for extended periods where the market is in an uptrend. In other words, the filter output does not have a zero mean as you would expect if the output consisted only of cyclic components whose periods fall between 10 bars and 48 bars.
Key Signal
Filt --> HP-LP Roofing Filter fast line
Trigger --> HP-LP Roofing Filter slow line
Pros and Cons
100% John F. Ehlers definition translation of original work, even variable names are the same. This help readers who would like to use pine to read his book. If you had read his works, then you will be quite familiar with my code style.
Remarks
The 41th script for Blackcat1402 John F. Ehlers Week publication.
Readme
In real life, I am a prolific inventor. I have successfully applied for more than 60 international and regional patents in the past 12 years. But in the past two years or so, I have tried to transfer my creativity to the development of trading strategies. Tradingview is the ideal platform for me. I am selecting and contributing some of the hundreds of scripts to publish in Tradingview community. Welcome everyone to interact with me to discuss these interesting pine scripts.
The scripts posted are categorized into 5 levels according to my efforts or manhours put into these works.
Level 1 : interesting script snippets or distinctive improvement from classic indicators or strategy. Level 1 scripts can usually appear in more complex indicators as a function module or element.
Level 2 : composite indicator/strategy. By selecting or combining several independent or dependent functions or sub indicators in proper way, the composite script exhibits a resonance phenomenon which can filter out noise or fake trading signal to enhance trading confidence level.
Level 3 : comprehensive indicator/strategy. They are simple trading systems based on my strategies. They are commonly containing several or all of entry signal, close signal, stop loss, take profit, re-entry, risk management, and position sizing techniques. Even some interesting fundamental and mass psychological aspects are incorporated.
Level 4 : script snippets or functions that do not disclose source code. Interesting element that can reveal market laws and work as raw material for indicators and strategies. If you find Level 1~2 scripts are helpful, Level 4 is a private version that took me far more efforts to develop.
Level 5 : indicator/strategy that do not disclose source code. private version of Level 3 script with my accumulated script processing skills or a large number of custom functions. I had a private function library built in past two years. Level 5 scripts use many of them to achieve private trading strategy.
Ehlers Zero Mean Roofing Filter [CC]The Zero Mean Roofing Filter was created by John Ehlers (Cycle Analytics For Traders pg 80) and this is a much more reactive roofing filter compared to Ehler's Roofing Filter which I also added for reference. Buy when the indicator rises over 0 and sell when the indicator falls below 0.
This was a special request so let me know if there are other indicators you would like to see me publish or if you want something custom done!
Ehlers Roofing Filter [CC]The Roofing Filter was created by John Ehlers (Cycle Analytics For Traders pgs 81-82) and this can be interpreted in a few ways. When the indicator crosses over its signal then it is a short term uptrend and when it crosses below its signal then it is a short term downtrend. It is also in a major uptrend or downtrend when it is above 0 and below 0 respectively. Buy when the indicator line is green and sell when the indicator line turns red.
Let me know if there are other indicators you would like to see me publish or if you want something custom done!
Ehlers HighPass-LowPass Roofing Filter [CC]The HighPass-LowPass Roofing Filter was created by John Ehlers (Cycle Analytics For Traders pg78) and this is a variation of a roofing filter that will let you know which direction the stock is trending. If it falls below 0 then the stock is in a downtrend and if it rises above 0 then it is an uptrend. Buy when the indicator line is green and sell when it is red.
Let me know if there are other scripts you would like me to publish or if you want something custom done!
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.
Ehlers StochasticEhlers Stochastic script.
This indicator was originally developed by John F. Ehlers (Stocks & Commodities V. 32:1: Predictive And Successful Indicators).