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;
```

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 amCan't explain it better than Mladen, this is his explanation:::global wrote: ↑Mon Dec 24, 2018 8:21 amHi Mladen, Mr. Tools, Jimmy and All,

Can someone please explain or point to where I can find an explanation of the indicator options, PaFilter and PaCycles for example in the indicator, "Dynamic Zones pa adaptive SMI correct 2.01" posted previously in this thread here:

viewtopic.php?p=1295127752&sid=ba20b04e ... 1295127752

and in the attached indicator by Mladen dynamic_zone_pa_adaptive_rsx_nrp_alerts_lines_divergence_nmc.mq4

Those two options, PaFilter and PaCycles also appear in many adaptive indicators but unless we understand exactly what they do then it would be just speculation to try to use them effectively. Also do these adaptive indicators automatically find the dominant cycle as explained in Elher's Model in the article "Advanced Adaptive Indicators Theory and Implementation": and in the attached pdf file Elher's Rocket Science Made Easy?

Or, do we have to adjust the two options, PaFilter and PaCycles by trial and error to get the indicator in sync with the dominant cycle? If so, then how can we go about adjusting those two options to sync with the dominant cycle and do we confirm when it's in sync?

The explanations in the article and pdf file are over my head but I would really like to know what relation PaFilter and PaCycles have to those explanations so I can use them with understanding. In other words, exactly what are we adjusting with those two options. Please forgive me for my ignorance on these things but we have to start from somewhere. Thanks.

dz_pa_rsx.gif

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