The Rescaled Range Analysis is an interesting statistical tool to detect long-range dependence in a time-series, and it also provides a method to estimate the Hurst Exponent. I have detailed to some extent this method on my other blog at this address.

Having estimated the Hurst Exponent, I was then able to write a Fractalised Moving Average, very much in the style of the FRASMA, except that this one, called RS_FRASMA, used the estimation of the Hurst Exponent coming from a Rescaled Range Analysis.

Unfortunately, this analysis is rather demanding in terms of computing power and time, I was therefore limited to small sample of values and even then, the processing time is quite long, furthermore, the result of the estimation is not very good, and not good enough anyway to be usable in terms of a fractional bands type of indicator.

Nevertheless, the RS_FRASMA may still be of some interest, if only in comparison with other MAs, and I therefore uploaded a script in MQL4 at this address.

The logic of the RS_FRASMA is similar to the one at work in the FRASMA: An SMA is modified by multiplication of its speed with a factor alpha defined as such:

Where H is the Hurst Exponent.

Here is what it looks like, the red curve is the RS_FRASMA, the yellow one is the FRASMA, and the blue one is an SMA, all with unmodified speed of 30:

The parameters of RS_FRASMA are:

period (integer): The size of the sample on which the Rescaled Range Analysis is performed, it must be a power of 2 (4,8,16,32,64,128,...), the default is 64, and in consideration of the limited computing power of MT4, I don't advise going higher than 256.

normal_speed (integer): This is the normal speed of the Moving Average before it is modified by the Hurst Parameter.

PIP_Convertor (integer): The factor necessary to convert real price to PIPS, default is 10000 (for EUR/USD)

type_data (0,1,2,3,4,5 or 6): This is the type of price the indicator will consider (0=CLOSE, 1=OPEN, 2=HIGH, 3=LOW, 4=MEDIAN, 5=TYPICAL, 6=WEIGHTED), default is 0.

## 6 comments:

Amiable post and this mail helped me alot in my college assignement. Thanks you as your information.

Opulently I agree but I about the post should secure more info then it has.

Nice fill someone in on and this mail helped me alot in my college assignement. Gratefulness you as your information.

Can you use the rescaled range analysis for a computation of Fractal Dimension Index like the the marvel FGDI?

And if there is a problem with computation, you could implement a dll file so you could use the entire computation power of the OS. I means so because the results given a high period integer the results are really amazing. You could even compare with the really sharp digital filters.

A further upgrade could be to color code the indicator

Yes, you certainly can use the Rescaled Range Analysis to compute the fractal dimension Fgdi, once you get the Hurst exponent H, since you have the equation Fgdi=2-H.

As I said, the problem is to get a high period for the Rescaled Range to be performant, I haven't looked at the possibility of using a .dll, it may be a good idea to investigate, I am working on a number of other things right now, but I will try to look at it in the near future.

Now if you feel like doing it yourself, go ahead, and let me know if you upload something on MQL4 site, I will then provide the link on my blog.

Thanks for your suggestion, I am still not very experienced in programming on MQL4 and I definitely have a lot of things to learn in the way of improving the performance of the indicators I have provided so far.

Cheers

Jean-Philippe

I would like to suggest that you use the most recommended Forex broker:

eToro.Post a Comment