ALB Periods, Swing Points & RSI

191
As we are starting to see much more new coders visiting this site for guidance, bringing this thread back to it's roots, here are what we can call the "beginning" of the Adaptive Lookback indicators which were coded by Mrtools & Mladen.

As explained by Mladen:

Of adaptive lookback

The Adaptive Lookback (period finder) is truly a market-driven indicator used to determine the variable lookback period for many different indicators, instead of a traditional, fixed figure.

It is based on the frequency of market swings - the time between swing highs or swing lows. A swing high is defined as two consecutive higher highs followed by two consecutive lower highs; a swing low is defined by two consecutive lower lows followed by two consecutive higher lows. As swing points typically accompany reversals, they occur more frequently in choppier and volatile markets than in trends.

Adaptive lookback period is determined as :

  1. Determine the initial number of swing points (swingCountparameter) to use in the calculation.
  2. Count the number of price bars it takes for the n swing points to form.
  3. Divide step 2 by step 1 and round the result.

Interpretation

This makes the variable lookback period grow in calm or trending markets, and shorten in range-bound and volatile markets. For a trend-following system you would like the opposite to prevent being whipsawed, therefore this indicator and it's usage as a period modifier is more suitable for short-term traders and counter-trend systems (so, in all systems where maximal speed of reaction and signaling is required).

Experiment with applying the adaptive lookback period to different indicators and you'll see how more responsive they become in volatile markets. Some of the experiments are going to be posted on this thread with immediate comparison to "non-adaptive" counterparts

Attached on this post

alb - swing points -> the basic indicator (simply showing swing points). You will notice that it draws the "peak" with 2 bars displacement. That is done in order to avoid any any kind of repainting (no lag is added to swing points finding thought)

alb - periods -> the "next step" : periods already calculated

alb - RSI -> RSI made adaptive with a help of alb period finder



These users thanked the author Jimmy for the post (total 3):
Sutatong, dksolo, 太虚一毫
Are you looking for a Forex broker? FBS cuts spreads by up to 58%. Click here to begin your trading journey, today.
No commissions are earned by Forex-station.


Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance


ALB Stochastic

192
Continuing from the last post.

As explained by Mladen:

Adaptive lookback stochastic

On the picture compared to "regular" (14,3,3) stochastic. It seems that it really does reacts much faster than the regular one (but I leave the exploration and conclusion of it to all of you)
Are you looking for a Forex broker? FBS cuts spreads by up to 58%. Click here to begin your trading journey, today.
No commissions are earned by Forex-station.


Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance

ALB Moving Average

193
Again, continuing on from the last post.

As explained by Mladen:

Adaptive lookback moving average

Compared - 5 swingCount adaptive lookback moving average (ema mode) (green) and 14 period ema (red). Speed of change obviously can not be compared,and a "lessened lag" seems to make alb suitable for filtering
Are you looking for a Forex broker? FBS cuts spreads by up to 58%. Click here to begin your trading journey, today.
No commissions are earned by Forex-station.


Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance

Re: Adaptive Indicators for MT4

194
Many Thanks for posting these ALB indicators, it has given me much to think about. Many months ago I posted my attempt to make an Adaptive TDI, and the team here kindly send me an adaptive RSI to work with. The truth was I wasn't trying to make an adaptive indicator in the way I was describing but I was actually trying to make an ALB indicator (as I now know who to descrive it). Sadly my coding is so 'basic' that I never fully achieved what I was looking for,I achieved some sort of outcome that definitely did change the lookback and it did have the desired effect, but my inexperience with arrays meant you had to run it for some time before the adaptiveness 'sort of' worked, it didn't display historical values.

I like your idea of using swing points, my original idea was to use an ATR (using recent high/low as reference) as the basis of changing the lookback. Large ATR, shorter lookback, Small ATR, longer lookback.

Have you tried making an ALB TDI or TDIRSX ? Can you ALB an 'adaptive' indicator ?

Anyway - good work as always guys and thanks for sharing.

MagnifyRe: Adaptive Indicators for MT4

195
mrtools wrote: Tue Oct 16, 2018 10:26 pm

Try this one!
Hello,

I am using the latest version of "Adaptive - jurik filter (mtf + alerts + fl's).ex4" but I don't seems to get "neutral" to show on my graphs at all, in any time frame. It is always red or green. I would assume some of these 'flatter' areas would be neutral. Any suggestions or something i am missing here?

Thanks!


Re: Adaptive Indicators for MT4

196
jwigginton27 wrote: Sun Aug 18, 2019 5:20 pm

Hello,

I am using the latest version of "Adaptive - jurik filter (mtf + alerts + fl's).ex4" but I don't seems to get "neutral" to show on my graphs at all, in any time frame. It is always red or green. I would assume some of these 'flatter' areas would be neutral. Any suggestions or something i am missing here?

graph.jpg


Thanks!
If you use the outer levels cross you will get the neutral colors, if you use the color on slope or middle cross it will be 2 colors..

Re: Adaptive Indicators' PaFilter, PaCycles Options & Dominant Cycle

198
Hi Mladen, Mr. Tools, Jimmy and All,

Within Mladen's indicator, "Dynamic zone pa adaptive Rsx nrp_alerts_lines_divergence nmc.mq4" that I attached below there is the iHilbertPhase() function that calculates the Length variable then the Kg and Hg variables are derived as below.

Code: Select all

double Length = iHilbertPhase(wrkBuffer[r][12],PaFilter,PaCycles,i);
double Kg     = (3.0)/(2.0+Length);
double Hg     = 1.0-Kg;
However, I would like to know what is the instantaneous amplitude, momentum as shown in the image below, plus the phase and the length in bars of the dominant cycle that is calculated by your "Dynamic zone pa adaptive Rsx nrp_alerts_lines_divergence nmc.mq4" indicator. It may be that all those values are already calculated by the iHilbertPhase() function in this indicator but with variable names I don't understand so I don't know what the variables such as Length, Kg and Hg are referring to. So if those values are already calculated then please let me know which variables are actually referring to these 4 values: the instantaneous amplitude, the momentum, the phase and the length in bars of the dominant cycle. Otherwise, can you please add these 4 values to the iHilbertPhase function so the current 4 values can be displayed as a comment, or better than that, as 4 additional buffers so we can know these 4 values at any bar in the past?

My idea is to use these 4 values to understand how much of the current amplitude we have already traveled so far within the current dominant cycle, or more important, how much amplitude is left before we reach the full amplitude so we can know if there are enough pips left to make a good profit, or at least for our trailing stop to break even plus a small profit. Also, with the amplitude and momentum values we can know whether the market is in cycling or trending mode and if trending by how much.


Thank you very much Mladen for writing the attached indicator and we hope you or one of your associates can add those 4 values or post the code to add those values to the iHilbertPhase() function. We are looking forward to hearing from you all. Thanks.

Regards,
global
mrtools wrote: Mon Dec 24, 2018 11:42 am

Can't explain it better than Mladen, this is his explanation:::

And now the reason for posting at this thread :

John Ehlers made also an indicator called Phase accumulation. I did not find a working version of it for metatrader 4 (the ones I found are with too much deviations from the original, so the usage of those is rather limited) so made one. The idea (in short) is to find how many bars does it take to add up every bars phases and to reach certain cycle (Ehlers uses only 1 full cycle but I decided to make it as a parameter where you can choose for how many cycles do you want to check the phases for - the "why" I did it will be explained later)



So, the way it is calculated, it gives a kind of a "perfect" period that should be applied to some indicator. And now the "why" variable cycles parameter : if we test just 1 full cycle then the speed of an indicator can not be changed (it will depend solely on data) and that way some indicators that could use this way of calculating periods could not benefit from it : averages, MACD, and so on ... But with variable cycles they become "controllable" and in that way, much more usable. So here are two offsprings of the Phase accumulation : Phase accumulation EMA (so adaptive) and Phase accumulation MACD (adaptive again). On the picture : Half cycle EMA and full cycle EMA, and the same cycles MACD

PS: Ehlers uses default value 7 for filter (smoothing) but I decided to set it to no smoothing (when filter is set to 1 or less there is no smoothing)) in order to make it clearer what exactly does the Phase accumulation do

And more from him

Theory :

The Hilbert Transform itself, is an all-pass filter used in digital signal processing. By using present and prior price differences, and some feedback, price values are split into their complex number components of real (inPhase) and imaginary (quadrature) parts.

This version :

We are using the Hilbert transform in a phase accumulation mode in order to calculate how many bars are needed to accumulate enough one bar "inPhases" to reach the desired cycle. That way it adjusts / adapts to the market conditions. As such you can not adjust the parameters to get a "classical" counterpart - simply it is not going to be as anything based on fixed periods and one should forget classical periods term for this one and get used to the cycles term
Image

Tema (R-squared) Adaptive

199
After running a site audit tonight, here are two high-quality indicators made by Mladen & Mrtools which i'll include here to try and keep things organized :)

This is the Tema (r-squared) adaptive (experiment) for MT4.
These users thanked the author Jimmy for the post (total 2):
ionone, Chickenspicy
Are you looking for a Forex broker? FBS cuts spreads by up to 58%. Click here to begin your trading journey, today.
No commissions are earned by Forex-station.


Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance

Ema (R-squared) Adaptive

200
And here is the Ema (R-squared) Adaptive for MT4.
These users thanked the author Jimmy for the post (total 3):
ionone, 太虚一毫, Marktaylor58
Are you looking for a Forex broker? FBS cuts spreads by up to 58%. Click here to begin your trading journey, today.
No commissions are earned by Forex-station.


Guide to the "All Averages" Filters (ADXvma, Laguerre etc.) 🆕
Use Fibonacci numbers for indicator settings + How to draw Fibonacci Extensions
An easy trick for drawing Support & Resistance


Who is online

Users browsing this forum: Bing [Bot], ChatGPT [Bot], DotNetDotCom [Bot], Google [Bot], LUCAS123, Majestic-12 [Bot], Narutopips, phnthnhnm, Seznam [Bot], ssscary, Telegram [Bot] and 112 guests