Hull Moving Average - page 16

 
WR1:
Hi Mladen

when you get half a chance

please can you make your original HMA colored nrp into MTF and can it have interpolate

unless its around already and ive missed it

thanks alot

much appreciated

WR1

One version of of non repainting multi time frame Hull moving average is posted at this post : https://www.mql5.com/en/forum/174961/page3 (with default parameters (HMASpeed==2) it is the same as the "regular" HMA nrp)

 

Hi MLaden,

I believe I understand you and agree with you for historical values of a higher time frame calculation. We only have a limited number of bars corresponding to additional data points(bars on the lower time scale) so we need interpolation, linear quadratic etc. to fill in the missing bars or use a step function to span the two higher time frame values on the lower time frame. However, once the indicator has started, we are getting tick by tick data points which apply equally to both the lower and higher time frames. What I was wondering was if there was an indicator that calculated and stored the upper values for the intervening lower bars. For example, using a H1 and H4 time frame. We can calculate the H4 bar and then linearly interpolate the missing three lower bar values using the proportional difference between Bar N and Bar N+1 for Bars that occurred prior to the time the indicator started. What I was wondering is if instead of interpolating for the missing bars going forward after the indicator started, we save and store the intermediate Hourly Bar values of the higher time frame. With this approach we would have the exact values for the three interval bars. I recognize that there will be a discontinuity between the historical intermediate values for the higher time frame prior to when the indicator started. So if a H4 indicator goes from 1.0 at bar N+1 to 1.4 at Bar N, the intermediate interpolated values would be 1.1, 1.2, 1.3. However, in actuality, the values could be 1.0 1.3, 1.5, 1.4 based on values at times N, N+1, N+2, N+3.

I guess what I am really saying is why use the upper time frame at all for an MTF indicator and instead use the lower time frame data points but advance the upper indicator every Nth bar instead of every bar and use the actual values for each of the intervals.

If you have a simple MTF indicator using an EMA, could you post it and I will use it to test my theory and post it back.

Tzuman

 

Hi Mladen,

Well I test and I'm ok with you it's not really good compared to others Hull MA

As I/We say, for me the best moving average need to be fast AND smooth

So I test different MA (on my graph) that I think to be interesting

Adaptive T3 (blue/orange)

NonlagMA (Green/red)

JJMA (only green, I haven't a bicolor JJMA)

And a Hull

(Sorry, difficult to be clear because I can't deplace the lines)

The purpose of the game was to try to compare the MA (with different periods of course)

For me

Adaptive T3 Smooth 4/5 Fast 4/5

Nonlag MA Smooth 3/5 Fast 5/5

Hull Smooth 3/5 Fast 3/5

JJMA Smoooth 4/5 Fast 4/5

So, just an idea, I think it could be interesting to make a Hull adapted by adaptive T3 (gloups...), and a Hull adapted by JJMA. Can you do these please ?

I compare 3 JMA too (Spiggy, Starlight and Kositsin). As you see on the graph, the best is clearly the Kositsin in green (JJMA), and the worth the starlight (and repaint)The Adaptive T3 and the JJMA I use for the graph and to create these Hull adaptive

jjma.mq4

adaptive_t3_mladen.mq4

Thousands thanks for the community Mladen

Have a nice week-end

Zilliq

zilliq:
Thanks a lot Mladen, I will try when I will come back at home

I will compare with a Hull MA and your NonlagMA

Completely Ok with you: I prefer when there is some smoothness. Fast and Smoothness is so Lovely...

Do you know if a Hull variation T3 exists ?

And perhaps it's stupid, but you create a Hull moving average adapted with a nonlag Ma, and you're not happy with it. Do you think the result (smoother) will be better with a NonlagMa adapted with a Hull MA ?

Bye and nice Week-end

Zilliq

 
mladen:
WR1 One version of of non repainting multi time frame Hull moving average is posted at this post : https://www.mql5.com/en/forum/174961/page3 (with default parameters (HMASpeed==2) it is the same as the "regular" HMA nrp)

Thanks alot

 
mladen:
Tzuman

I am not sure that I understand correctly.

The interpolation method is quite simple actually : it is a linear interpolation between two ending points of the higher time frame (that is why I stated a couple of times that interpolated and non-interpolated (the classical "keris method") versions have exactly the same number of guaranteed exact points per higher time frame bar : 1 per each higher time frame bar (the rest is a matter of probability and price changes). You can leave that interpolated (or "step-like) values refreshing out, (calculate just the current bar of the lower time frame) but then you will get classical repainting indicator (since the exact state at some lower time frame point can not be calculated exactly in a lot of cases - it would need a really complicated reversal engineering way of calculating that I do not think that metatrader would "survive")

I hope that I understood the question correctly and that the answer is what you expected

Hi Mladen and Tzuman,

For a long time I also have a question related to this issue. When I used some type of MA (Ema or LWMA, for example) of smaller TF at Price_Close with Period_Length set to be equivalent with length of same MA for higher TF (EMA(H1-24 periods) and EMA(H4-6 periods) for instance), they were not the same. Could you explain it to me please ?

 
fareastol:
Hi Mladen and Tzuman, For a long time I also have a question related to this issue. When I used some type of MA (Ema or LWMA, for example) of smaller TF at Price_Close with Period_Length set to be equivalent with length of same MA for higher TF (EMA(H1-24 periods) and EMA(H4-6 periods) for instance), they were not the same. Could you explain it to me please ?

fareastol

Multiplying period to get a higher time frame values for averages is not a bad method (among others, Alexander Elder used that method in the earlier days of TA) but it is simply an approximation. Reason is simple : set of data used to calculate averages are different and you can not get same results from different sets of data. In my opinion it is better to use classical MTF (the way we are using it) if not for anythig else, because some indicators simply can not be calculated that way (just one example : try RSI, and the majority are like that)

 

About adaptive Function.

Hi Mladen ,

I have well study your volativity adaptive function ,why not use math round function??

With it (if i have all understand ),your adaptive period can works with all type of moving average or indicators !

Regards.

 
sohocool:
About adaptive Function.

Hi Mladen ,

I have well study your volativity adaptive function ,why not use math round function??

With it (if i have all understand ),your adaptive period can works with all type of moving average or indicators !

Regards.

sohocool

For one simple reason : simply for some averages when you change the calculating period, you will get a "step like" (very sudden change in value) averages instead of having a logical, as smooth as it is possible for that kind of average, values.

That is why I repeatedly told that only averages that can calculate fractional periods are suitable for adapting. Others can be adapted too (there is no limit for that) but the result itself is not "nice" (I hope you understand what do I mean by "nice"). On the other hand, averages like EMA for example, are "inheriting" previous value of itself and using that value in calculation and the calculation can use fractional period which makes it reasonably smooth and "logical" when calculating period is changed all the time

_____________________________

As an experiment : try adapting SMA (which allows only interger for calculating period due to its nature) and you will see what are the results going to look like in some cases

 
mladen:
sohocool

For one simple reason : simply for some averages when you change the calculating period, you will get a "step like" (very sudden change in value) averages instead of having a logical, as smooth as it is possible for that kind of average, values.

That is why I repeatedly told that only averages that can calculate fractional periods are suitable for adapting. Others can be adapted too (there is no limit for that) but the result itself is not "nice" (I hope you understand what do I mean by "nice"). On the other hand, averages like EMA for example, are "inheriting" previous value of itself and using that value in calculation and the calculation can use fractional period which makes it reasonably smooth and "logical" when calculating period is changed all the time

_____________________________

As an experiment : try adapting SMA (which allows only interger for calculating period due to its nature) and you will see what are the results going to look like in some cases

Hi Mladen,

Many thanks for your prompt reply.

Yes i know your way is the best one .

But with interger the step will be a small step (less than 1 period) round (14,4)=14.

and the Market is not so logical

 
sohocool:
Hi Mladen,

Many thanks for your prompt reply.

Yes i know your way is the best one .

But with interger the step will be a small step (less than 1 period) round (14,4)=14.

and the Market is not so logical

sohocool

I have a feeling that you are overlooking that the calculating period for consecutive bars will not always be similar. For example : on one bar it would be that 14 but on another it would be 4. And in that case it will have a very big change. If you try adapting SMA you will see immediately what happens in cases like that. So it is not just the fractional part (which helps a lot to keep it "smooth") but the fact that it can use fractional period usually shows that the calculation is suitable for adapting (because in most cases when the period can be fractional, previous value of the average is used in some form in calculation and without "inheriting" it is almost impossible to get a normal looking average when adapting)

Reason: