## Indicators by William Blau

Moderators: mntiwana, mrtools, xard777

NO EXTERNAL LINKS, SOURCE CODE REQUESTS OR MODIFICATION OF DECOMPILED INDICATORS. To avoid post deletion please follow the rules.

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

#81
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
global wrote:
Mon Dec 24, 2018 8:21 am
Hi 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

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

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

#82
I am not able to pick up the divergence areas via the thin lines on chart (because of other chart indicators ). I have tried to get the divergence price and indicator trendlines to be thicker but cannot see how to do it.
These, I believe, are the line of code involved.
Thanks

Code: Select all

`````` if (divergenceOnChartVisible)  DrawPriceTrendLine("h",Time[currentPeak],Time[lastPeak],High[currentPeak],High[lastPeak],divergenceBearishColor,STYLE_SOLID);
if (divergenceOnValuesVisible) DrawIndicatorTrendLine("h",Time[currentPeak],Time[lastPeak],values[currentPeak],values[lastPeak],divergenceBearishColor,STYLE_SOLID);
}
if(values[currentPeak] > values[lastPeak] && High[currentPeak] < High[lastPeak])
{
if (divergenceOnChartVisible)  DrawPriceTrendLine("h",Time[currentPeak],Time[lastPeak],High[currentPeak],High[lastPeak], divergenceBearishColor, STYLE_SOLID);
if (divergenceOnValuesVisible) DrawIndicatorTrendLine("h",Time[currentPeak],Time[lastPeak],values[currentPeak],values[lastPeak], divergenceBearishColor, STYLE_SOLID);
}``````

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

#83
Tue Oct 01, 2019 1:56 am
I am not able to pick up the divergence areas via the thin lines on chart (because of other chart indicators ). I have tried to get the divergence price and indicator trendlines to be thicker but cannot see how to do it.
These, I believe, are the line of code involved.
Thanks

Code: Select all

`````` if (divergenceOnChartVisible)  DrawPriceTrendLine("h",Time[currentPeak],Time[lastPeak],High[currentPeak],High[lastPeak],divergenceBearishColor,STYLE_SOLID);
if (divergenceOnValuesVisible) DrawIndicatorTrendLine("h",Time[currentPeak],Time[lastPeak],values[currentPeak],values[lastPeak],divergenceBearishColor,STYLE_SOLID);
}
if(values[currentPeak] > values[lastPeak] && High[currentPeak] < High[lastPeak])
{
if (divergenceOnChartVisible)  DrawPriceTrendLine("h",Time[currentPeak],Time[lastPeak],High[currentPeak],High[lastPeak], divergenceBearishColor, STYLE_SOLID);
if (divergenceOnValuesVisible) DrawIndicatorTrendLine("h",Time[currentPeak],Time[lastPeak],values[currentPeak],values[lastPeak], divergenceBearishColor, STYLE_SOLID);
}``````
On this one you can change the width,style and color, just remember if you want to use something instead of STYLE_SOLID your width will have to be 0 or 1.

### Re: Indicators by William Blau

#84
Would just like to thank you all for providing Blaus indicators - He is one of my favorite creators!
Peace be upon you all!

### Re: Indicators by William Blau

#85
FBI wrote:
Mon Aug 13, 2018 6:49 pm
It shows nice divergence, don`t know yet how easy is to trade live.

GBPJPYM1.png
Can not find correct indicator and replicate your settings. Which one is it?

::::EDIT::::
Found it....did not knew there was a gazzillion settings build in the indicator! Once again A BIG THANK you to developers!

### Re: Indicators by William Blau

#86
mrtools wrote:
Fri Apr 07, 2017 10:27 am
mntiwana wrote: Dearest MRTOOLS
I tried many times and was behind from days to get some thing pretty as results but what i noticed,it can not be handled in long term trading with current parameters and methods,may be some smooth method like TMA,SMOOTHER or Jurik kind will help,do you think if schaff and or EFT/IFT can be applied some where but i do not know exact,of course you knows better i am just guessing around
as for short term it is already doing well as seen in picture
Mntiwana, maybe try this version, it's using one more average for the smi and phase accumulation.
Dear mntiwana,
I installed your indicator "Dynamic Zones pa Adaptive SMI" on my MT4, but it doesn't work: It doesn't appear even on my chart, as you can see in the attached screenshot.
Please, let me know how we can solve this problem.
Many thanks
Kind regards
mama1960

### Re: Indicators by William Blau

#87
mama1960 wrote:
Sun May 24, 2020 1:55 am
mrtools wrote:
Fri Apr 07, 2017 10:27 am

Mntiwana, maybe try this version, it's using one more average for the smi and phase accumulation.
Dear mntiwana,
Hello, Mr. mntiwana, has not been present for some time on this forum.
To make the indicator work, maybe you need to DynamicZone.dll

Ciao,il Signor mntiwana,non è più presente da tempo su questo forum.
Per far funzionare l'indicatore forse ahi bisogno delle DynamicZone.dll viewtopic.php?p=1295409820#p1295409820
viewtopic.php?f=579496&t=8431109&p=1295 ... 1295397560
The perfect indicatoris our head ...

Too many indicators confuse the head

1. ### Similar Topics

1. #### Blau- TSI (mtf+ diver+ alerts) Crashes

2 Replies 898 Views

by forexdemogod, Wed Dec 19, 2018 3:54 am in Trading Platform Discussion

2 Replies
898 Views
2. #### Various Indicators - (MT5)

2 Replies 3944 Views

by mntiwana, Wed Nov 28, 2018 12:39 am in MT5 Indicators

2 Replies
3944 Views