Ehlers Discrete Fourier TransformThe Discrete Fourier Transform Indicator was written by John Ehlers and more details can be found at www.mesasoftware.com
I have color coded everything as follows: blue line is the dominant cycle, orange line is the power converted to decibels, and I have marked the other line as red if you should sell or green if you should buy
Let me know if you would like to see me write any other scripts!
Ehler
Ehlers Correlation Trend Indicator CTI by Cryptorhythms [CR]Ehlers Correlation Trend Indicator CTI by Cryptorhythms
📜Intro
In his article “Correlation As A Trend Indicator” in issue May 2020 of TASC, author John Ehlers introduces a new trend indicator that is based on the correlation between a security’s price history and the ideal trend: a straight line. He describes methods for using the indicator to not only identify the onset of new trends but to identify trend failures as well. He presents what looks like a simple and elegant idea for a trend-detection and mode-switching indicator.
📋Comments
Careful market selection may be the key to a correct application of the indicator. Even such barebone rules could shine with stocks like AAPL that tend to develop prolonged trends. But for others like CAT, which can keep oscillating in ranges for years, results will be much less impressive. They require a different approach. For example, you would want to buy when Correlation Trend falls significantly below zero and sell when it reaches positive values.
Therefore, it would be an interesting problem to research Correlation Trend’s ability to identify the switch to a cycle mode. That might help develop countertrend systems and
trade pullbacks. Another possible application might be to act as a system filter of change from trending mode to mean-reversion mode.
Extras
As usual when porting indicators to the library here on tradingview, I like to add some extra flare!
💠Customizable Overbought and Oversold Zones for Alert Creation
💠Bar coloration based on trade state for easy visual at a glance chart checking
💠Some basic example Entry and Exit conditions and a simple Trade State Engine to get you going creating your own strategy
Enjoy!
👍 We hope you enjoyed this indicator and find it useful! We post free crypto analysis, strategies and indicators regularly. This is our 81st script on Tradingview!
Phase CalculationPhase Calculation was authored by John F. Elders in the Stocks and Commodities Magazine 11/1996
This indicator will tell you if the stock is in a uptrend or downtrend. A phase number with a low number means it is in a uptrend and a phase number with a high number means it is in a downtrend.
Let me know if you want to see me write code for different indicators!
Combo Backtest 123 Reversal & D_ELI (Ehlers Leading Indicator) This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
This Indicator plots a single
Daily DSP (Detrended Synthetic Price) and a Daily ELI (Ehlers Leading
Indicator) using intraday data.
Detrended Synthetic Price is a function that is in phase with the dominant
cycle of real price data. This one is computed by subtracting a 3 pole Butterworth
filter from a 2 Pole Butterworth filter. Ehlers Leading Indicator gives an advanced
indication of a cyclic turning point. It is computed by subtracting the simple
moving average of the detrended synthetic price from the detrended synthetic price.
Buy and Sell signals arise when the ELI indicator crosses over or under the detrended
synthetic price.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & D_ELI (Ehlers Leading Indicator) This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
This Indicator plots a single
Daily DSP (Detrended Synthetic Price) and a Daily ELI (Ehlers Leading
Indicator) using intraday data.
Detrended Synthetic Price is a function that is in phase with the dominant
cycle of real price data. This one is computed by subtracting a 3 pole Butterworth
filter from a 2 Pole Butterworth filter. Ehlers Leading Indicator gives an advanced
indication of a cyclic turning point. It is computed by subtracting the simple
moving average of the detrended synthetic price from the detrended synthetic price.
Buy and Sell signals arise when the ELI indicator crosses over or under the detrended
synthetic price.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & Detrended Synthetic Price V 2 This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Detrended Synthetic Price is a function that is in phase with the
dominant cycle of real price data. This DSP is computed by subtracting
a half-cycle exponential moving average (EMA) from the quarter cycle
exponential moving average.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & D_DSP (Detrended Synthetic Price) This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Detrended Synthetic Price is a function that is in phase with the
dominant cycle of real price data. This DSP is computed by subtracting
a half-cycle exponential moving average (EMA) from the quarter cycle
exponential moving average.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Combo Backtest 123 Reversal & D_DSP (Detrended Synthetic Price) This is combo strategies for get a cumulative signal.
First strategy
This System was created from the Book "How I Tripled My Money In The
Futures Market" by Ulf Jensen, Page 183. This is reverse type of strategies.
The strategy buys at market, if close price is higher than the previous close
during 2 days and the meaning of 9-days Stochastic Slow Oscillator is lower than 50.
The strategy sells at market, if close price is lower than the previous close price
during 2 days and the meaning of 9-days Stochastic Fast Oscillator is higher than 50.
Second strategy
Detrended Synthetic Price is a function that is in phase with the
dominant cycle of real price data. This DSP is computed by subtracting
a half-cycle exponential moving average (EMA) from the quarter cycle
exponential moving average.
See "MESA and Trading Market Cycles" by John Ehlers pages 64 - 70.
WARNING:
- For purpose educate only
- This script to change bars colors.
Adaptive RSIThis is an implementation of John Ehlers’ Adaptive RSI , as described in his book Rocket Science for Traders: Digital Signal Processing Applications (2001-07-20).
It does not need a length value to be specified by user. It adopts itself perfectly to the price chart.
It integrates the idea of automatically determining the Dominant price cycle through a Homo-dyne Discriminator, and using half of a cycle length as the input for the RSI . Not only determines the most effective range for the RSI by setting it based on the cycle, but also makes the RSI PDF (Probability Distribution Function) adjustable as shown in John Ehler's papers.
Works just like a normal RSI , but should have less false signals.
Added alerts for Overbought and Oversold zones
MTF IQ IFM Moving AverageMTF ready adaptive MA using Ehler's IQ IFM ( In Phase - Quadrature Instantaneous Frequency Measurement ).
Ehler's formula is a method of quantitatively measuring the length of a market cycle. In this case it is used to calculate the "optimal" adaptive EMA.
Theoretically the length generated by Ehler's formula could be used in many indicators and it's been placed within it's own function so you should be able to simply copy/paste it. HOWEVER pine will not accept series variables for the length input used in built-in functions. You will have to manually code (or find) a version of your indicator that doesn't use the pine built in.
Options :
type : optionally add volume weighting
range : historical range used in IQ IFM
cycle length mult : method to create faster/slower MAs. eg 0.5 is half the length of a cycle and a faster EMA ie EMA10 vs EMA20
low sat fix : some cryptocurrencies with low satoshi values cause an issue with the calculation, if you get no/nonsensical lines, enable this. Shouldn't affect other instruments, but can be disabled just in case.
MTF options: run the calculation on an alternative timeframe
--------------------------------------
If you find it useful please consider a tip/donation :
BTC - 3BMEXEDyWJ58eXUEALYPadbn1wwWKmf6sA
Volume Zone OscillatorOscillator is build on Walid Khalil's and David Steckler's concept for leading volume oscillator
All indicators core's dynamics is fully explained it two articles bellow , written by concepts fathers
Stocks & Commodities V. 29:5 (16-23, 28): In The Volume Zone by Walid Khalil and David Steckler
edmond.mires.co/GES816/14-In%20The%20Volume%20Zone.pdf
2008-IFTA journal-Volume Zone Oscillator (VZO) ~by Waleed Aly Khalil
capitalsynergy.com/resources/IFTA09VZO.pdf
//
Extreme conditions are visually intuitive
Momentum shift alerts
Candle printer for H/R Divergence pockets and confirmed divergences
Ehlers white noise indicator "branch" have wonderful confluences with VZO so its included as optional feature, its toggle button and settings are market with ⚠️to remind that its still heavily experimental
Every visual object group in script can be turned off separately from each other for customization freedom
V0.5
MESA Adaptive Moving AverageIntro
One of Ehlers most well-known indicators! I've seen many variations of this on TradingView, however, none seem to be true to the original released by Ehlers himself.
I've taken it upon myself to simply translate the MAMA into Pinescript, instead of re-writing like some others have done.
You can use it as a very effective & adaptive moving average with other signals or
as a standalone signal.
In the case that you're going to use it for signals and not simple technical trading (non-quantitative),
I've also added a threshold parameter to filter out weak signals.
My MAMA indicator is different from others in very simple ways - I don't use the nz() command, which sets all "Not a Number" values to 0. In others' scripts, you immediately load the indicator with several 0 values,
causing a slight lag in future calculations since this code is recursive (refers to previous values it generated).
In my version, I simply wait until the script has access to all the bar data it needs, instead of instantly performing calculations and
setting erroneous values to 0. In this case, we start with the correct values (or closer to correct).
If you want to compare this indicator the current most popular MAMA by LazyBear, you'll notice it often gives buy and sell crosses one bar earlier than theirs.
Setting Parameters
Source - the data series to perform calculations on. (Initially, Ehlers himself favored hl/2, but conceded that there isn't empirical benefit over close.)
Fast Limit - controls how quickly the MAMA will "ratchet up" fast price action. (Higher values are faster)
Slow Limit - controls how closely the FAMA will follow the MAMA. (Again, higher is faster. You typically want the FAMA to be slower though.)
Crossover Threshold - simple error thresholding to limit the number of weak trade signals. (Lower means lower tolerance)
Show Crosses? - show/hide the arrows at moving average crosses
Adaptive Bandpass Trigger OscillatorThis is based off of Ehler's Bandpass Filter system (link below slides 15-17). I then used Ehler's methods for finding the dominant cycle to automatically input the dominant cycle to the length. Essentially Ehler runs a band pass with a given period to detrend the price data and highlight a cycle with the given frequency(length). This represents the In phase cycle. Ehler then creates the trigger line by taking the one bar momentum of the In Phase line, multiplying by 2Pi and then using this to create a 60 degree leading signal. The triggers are crossovers of the In Phase and Lead lines. You can also use conservative signals by waiting for the In Phase line to trend in the direction of the trigger crossover as well.
Delta represents how much to influence the oscillator by the price (Delta 0 is a perfect wave)
Alpha represents how quickly to adapt between the dominant cycle changes in the price.
Thanks to LazyBear for implementing Ehler's original adaptive code, which I used for this system
Thanks to HPotter for the BandPass Filter code, which I used as a base for implementing the rest of the system
www.mesasoftware.com
Ehler Bandpass Trigger OscillatorThis is based off of Ehler's Bandpass Filter system (link below slides 15-17). Essentially Ehler runs a band pass with a given period to detrend the price data and highlight a cycle with the given frequency(length). This represents the In phase cycle. Ehler then creates the trigger line by taking the one bar momentum of the In Phase line, multiplying by 2Pi and then using this to create a 60 degree leading signal. The triggers are crossovers of the In Phase and Lead lines. You can also use conservative signals by waiting for the In Phase line to trend in the direction of the trigger crossover as well.
Length represent the cycle period you want to highlight.
Delta represents how much to influence the oscillator by the price (Delta 0 is a perfect wave)
Thanks to HPotter for the BandPass Filter code, which I used as a base for implementing the rest of the system
www.mesasoftware.com
Recursive Median Oscillator & Fisher Transforms RibbonThis is a composite indicator made up of:
- modifided (rescaled) version of evergets version of recursive median oscillator.
- 1996anoojpatels Futur modification of Ehlers Fisher Transform Ribbons Indicator
I think Ehlers attempts to minimise latency in indicators are extremely valuable and some of my most use trading tools. Thanks to all the authors whose iterations keep moving these indicators toward perfection. Here is my contribution.
Crypto-Sticks Ehler Adaptive Center of Gravityby Cryptorthyhms🥢 Crypto-Sticks™: Ehler's Adaptive Center of Gravity
A new series of indicators brought to you by Cryptorthyhms...giving you an alternate look at your trusted favorites! Follow me, there are still 2 dozen Crypto-Sticks indicators planned - all will be released in public library.
🚀 Indicator Specific Info
🐻Thanks to Lazybear for posting the original EACG code I updated to create this indicator! (give that man a follow/thumbsup, hes a legend!)
New Crypto-Sticks option is an EMA of the average signal line output. Eventually I will go back and update the previous indicators with this feature as well!
⛔Please remember that this indicator is ADAPTIVE. The overbought and oversold ranges do not correspond to specific values. This does make it a bit harder to signal with, but its a great indicator nonetheless.
Heiken Ashi candles (default) adds some more clear trend changing points.
Volume weighting the HA candles adds a different dimension to the indicator which I have to explore more fully. VW does work okay on this indicator, skewing output but also adding some noise. An example of VW+HA:
💭Please leave me any ideas or feedback you have!
🚫If you use volume weighting you should be on heiken candles.
🚀 Crypto-Sticks General Info
🚧This series isnt polished 100%, and I have some more options I will add in the future. But for now, I want to just release them, as I am not sure when I will have the time to put more work into them (many other big projects I am working on).
📊Its basically reinterpretations of all your favorite indicators. I calculate the values a little bit differently than normal, but the end result is creating a candlestick chart (for the indicator!). Then I added the option to plot them as Heiken Ashi candles to smooth out noise and make signaling easier. I recommend using the indicator on this setting.
🔊Lastly I implemented a Volume Weighting system for them all which simply integrates volume into the formulas for these indicators. For the most part this feature is experimental and doesn't provide huge utility (yet - I have other ways I want to try it as well - just no time). Though on some of the indicators it already shows great promise.
👍Enjoying this indicator or find it useful? Please give me a like and follow! There are many more indicators to be released in this series, not to mention I post crypto analysis and other free indicators regularly.
💬Questions? Comments? Want to get access to an entire suite of proven trading indicators? Come visit us on telegram and chat, or just soak up some knowledge. We make timely posts about the market, news, and strategy everyday. Our community isnt open only to subscribers - everyone is welcome to join.
Ehlers FilterThis is the Adaptive Ehlers Filter.
I had to unroll the for loops and array because TV is missing crucial data structures and data conversions (Arrays and series to integer conversion for values).
I'm in the process of releasing some scripts. This is a very old script I had. This contains volatility ranges and can be used as trading signals. You can also see how the EF moves up or down, the direction, when price is sideways, and use price breaks up and down as signals from the line.
Have fun, because I didn't making this script hahaha
NOTE : There is an issue with the script where at certain time frames it positions itself below or above. I think its due to calculations. If anyone knows the fix before I get the chance to take a look at it, please let me know.
books.google.com
Multi OscillatorAn oscillator toolbox. Highly configurable.
Three oscillators can be selected to show the momentum of:
price
flow -> the change in price
volume
money -> (volume * flow)
See the comments at the beginning of the script for a complete description.
--------------------------------
As my interest in oscillators increased, I was baffled by the vast jungle of available options. Over time, I did my best to distill the essence of what each indicator offered: RSI, Stoch RSI, CMF, OBV, MFI, MACD, VPT, Accum/Dist Index, Ehler's roofing...
Standing on the shoulders of giants, this indicator is a humble re-synthesis of all these indicators. The "value add" is in the organization, which facilitates the cohesive processing of different oscillators in one plot.
In this script, an oscillator is composed in stages:
Construct signal -> Remove noise -> Compose Oscillation -> Normalize -> Smooth -> Shape
where each stage is configurable.
There is a lot of flexibility, but once defined, each source (price, flow, volume, money) is constructed in the same way. This facilitates a degree of cohesion that is hard for my brain to render otherwise.
While I find the default settings valuable in my trading, there are so many ways to experiment. Find out what works for you! Share comments of new configurations... as we all learn!
Fisher Transform Ribbons Indicator V1.0Utilizing the Fisher Transform by Ehlers with different lengths based on multipliers will allow you to notice movements in price and understand whether the shift was a correctional wave, or part of the overall trend.
To learn about Fisher Transform , check out the Fisher Transform documentation: www.mesasoftware.com
Fisher has plenty of functionalities. Ribbons provides you with a view of consistency in price action. If all ribbons flip, generally this is a strong signal that the trend is changing. Fisher is extremely punctual (minimum input lag) and robust (doesn't miss movement). Look for everything, including divergences, trends, and Oversold, Overbought points.
Changing length will further provide you more sensitivity in overselling and buying, while numbing chop.
Enjoy!
And for a single Fisher, check out HPotter's Fisher Transform or LazyBear's implementation of the inverse of the Fisher, which has many other interesting properties