For grits and shins I am trying to replicate Richard’s HurstMacd, but the programming is beyond my skills. I need to do the following, with Close simply representing whatever data series that is to be fed into it:
Deviation1.Set( Close – Mean );
Deviation2.Set( Close – Mean );
Deviation3.Set( Close – Mean );
Etc. from 4 to Period
Sum1.Set( Deviation1 );
Sum2.Set( Deviation1 + Deviation2 );
Sum3.Set( Deviation1 + Deviation2 + Deviation3 );
Etc. from 4 to Period
Difference.Set( Max(Sum data series) – Min(Sum data series) );
As you can see I need the Deviation and Sum data series to be self replicating based upon how many periods there are and then calculate the min and max of those figures. Anyone know how to do that? Thanks.
I'm very interested in this, please post more information. Using google I've learned about the Hurst Exponent, which this does not appear to be, but I haven't been able to find anything about a Hurst MACD. If I haven't made an error then the attached implements the code you asked for, but it doesn't appear to be a useful plot. Was that a fragment of the calculation?
(Thanks for the link above, your post beat mine ;-), I'll look at that and work on it some more)
The following user says Thank You to fluxsmith for this post:
Is your end goal the Hurst Exponent, where < .5 => mean reverting, == .5 => random, > .5 => trending? Or is the Hurst Exponent just a component of some kind of MACD plot that's the end goal? (I guess 'Hurst MACD' in the first post still has me confused.)
I am assuming that he is feeding the MACD into the filter and plotting the result with an offset to eliminate the lag and line it up with the prior data, then projecting the future plot in his mind. But I won't know until it is fully programmed. I am slow, so I was figuring the programming part would take me a couple weeks. Now it should only take me a week or so to finish using what you have given me, unless...
I reviewed the video and have to admit that I still don't know what a Hurst MA or a Hurst MACD is, but I think I've correctly come up with a Hurst Exponent indicator. I found it easier to first come up with a Fractal Dimension indicator and the infer the Hurst Exponent from that.
Revised: Solved a divide by 0 error when min(Close, n) == max(Close, n)
Last edited by fluxsmith; August 14th, 2010 at 06:57 PM.
The following 4 users say Thank You to fluxsmith for this post: