
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
Perhaps the problem is that you are building a regression on the whole set of samples.
This, as far as I understand, is wrong. With small values of N the points may lie on a completely different straight line or behave in an inadequate way. In order to approximate a straight line, one should take only the right part of the constructed curve, and precisely that part which lies on the regression line accurately enough. Peters, on the other hand, showed that there is a kink in this constructed line.
What will a simple column of only inflow figures with Hearst figure message give you, without knowing the sample itself, for which this calculation has been made? I decided to keep it simple. I have posted a picture showing the Hearst figure for the channels in the top left hand corner. Channel 1 is the longest, channel 4 the shortest on the graph. I think this will be more than enough for you to check your calculation algorithm.
https://c.mql5.com/mql4/forum/2006/06/channels_EURUSD.zip
Perhaps the problem is that you are building a regression on the whole set of samples.
This, as far as I understand it, is wrong. For small values of N the points may lie on a completely different straight line or behave in an inadequate way. In order to approximate a straight line, one should take only the right part of the constructed curve, and precisely that part which lies on the regression line accurately enough. Peters, on the other hand, showed that there is a kink in this constructed line.
It is quite possible. Here is a quote from a book once provided by Vladislav: "The wave-like behavior of the data indicates the existence of patches of different degrees (or, as they say, strength) of persistence on different timescales. That's what it looks like by eye. The question arises - by how much to shift to the right? And for sure it will affect the result, but for the better or for the worse.
Do you think the average inflow should be taken the same for all n, calculated for N or should be calculated for each n, moving towards N
PS: Forgive me, I like accuracy, or rather I was accustomed to it in MAI.
What would a simple column of inflow-only figures giving you the Hearst figure without knowing the very sample for which this calculation was made? I decided to keep it simple. I have posted a picture with the Hearst figure for the channels in the top left hand corner. Channel 1 is the longest, channel 4 the shortest on the graph. I think this will be more than enough for you to check your calculation algorithm.
https://c.mql5.com/mql4/forum/2006/06/channels_EURUSD.zip
I did not manage to immediately understand the sample itself and its length from the picture. Probably, I must have an expanded mind, but how to widen it? :о)))
It seems to me that the regression used to determine Hurst should be drawn from the end of the curve. And the criterion for the value of the interval can probably be taken as the slope of the obtained channel. As soon as it exceeds, say, 3-5% of the Log(R/S) value (i.e. begins to diverge), stop there.
Different sources diverge on this issue. And it is not even so much about the average, as about R/S. Many people believe that the sko should be taken for the largest sample N and only the spread should be taken for sample n. I, however, believe that this approach makes no mathematical (and physical) sense. All the values in the calculation should refer to the same sample.
I enlarged my mind exclusively with information given in this thread :o))). Try it too. Maybe it will help? I can only recommend you to read slowly at least Vladislav's posts and some of mine. In some posts (not all, because many posts were just scientific pointing fingers in the sky ;o)!) I laid out the basic gist of the strategy - or rather how I understand it.
I've been expanding my consciousness solely with the inoformations mentioned in this thread :o))). Try it too. May be it helps? I can only recommend you to read slowly at least Vladislav's posts and some of mine. In some posts (not all, because many posts were just scientific pointing fingers in the sky ;o)!) I laid out the basic gist of the strategy - or rather how I understand it.
Took your advice and reread your code again slowly and carefully on page 12 of 13.05.06 13:07. (notice, not only him) I think I understood why you can't give the "influx" in the text file. You, just don't have it.
I assume that the principles of calculation outlined in your post remain the same to this day. The calculation of H is done by the resulting formula:
H=log(R/S)/log(0.5*N)
To calculate R, you use:
pMin=Low[...]
pMax=High[...]
R=pMin-pMax
Open[]
It turns out that you are formally calculating something else than the Hearst index. Of course, Open[], Low[], High[] are all values of the same price. But from the point of view of the formula - they don't make up "inflow" or rather sequence (time - value). We cannot tell for a bar what and when was the first High[] or Low[]. The calculation itself is also a bit "broken" (put in quotes).
I remember that the method is specifically modified, but in this case quite a deep modification. I'm not questioning the correctness of calculations, I just want to understand what caused such, quite different from classic approach (definition of Hurst index in all sources is the same and does not coincide with "definition" in the algorithm) . I have not found in any source a restriction on method of calculation I use, there are no recommendations like "use only for Brownian motion". It's a good, accurate method (unless they lie, of course)
I still want to write classical Hearst calculation, and I'm sure (nobody has convinced me yet) that it will work no worse than stated algorithms.
At least I'll know for sure that I'm calculating Hearst.
PS: I think it's all about influx, I just wish I could sort out my own issues.
Of course, formally, there is no file - why do I need it? I don't create any files for calculations. All data is simply stored in arrays, and the necessary data is displayed on the chart.
In Vladislav's algorithm, the inflow is the difference between the price of the current bar and the projection of the linear regression channel calculated for the sample that does not include the current bar.
The calculation formula remains the same H=log(R/S)/log(0.5*N).
Indeed it is and it's been said a million times in this thread.
Yes, deep modification - specifically to solve our problem.
It seems to me that the regression used to determine Hurst should be drawn from the end of the curve. You can probably take the slope of the obtained channel as a criterion of the interval size. As soon as it exceeds, say, 3-5% of Log(R/S) (i.e. begins to diverge), put a point on it.
Different sources diverge on this issue. And it is not even so much about the average, as about R/S. Many people believe that the sko should be taken for the largest sample N and only the spread should be taken for sample n. I, however, believe that this approach makes no mathematical (and physical) sense. All the values in the calculation should refer to the same sample.
I will definitely try your recommendations. We agree on the choice of mean and RMS. I have implemented such an approach in my algorithm (if I haven't got it wrong).
In the sources I am also confused by the fact that all the calculations are based on a year. A year in the nature is a cycle. No hydraulic engineer will give his opinion on "will the dam burst or not burst" event basing only on data of dry three-month summer. And this philosophy cannot yet be transferred to quotations - how much to take N, what criteria. There is only vague reasoning on the subject. Of course, it all depends on the objective.
I have another request for you. It's not very convenient to ask (but I have to be cheeky, sorry), but could you please have a fresh look at my code for deviations from calculation logic and errors. I'm not asking you to write it, I'll do it myself. It will be enough to say that there is such and such an error here, look at such and such a formula.
In Vladislav's algorithm, the inflow is the difference between the price of the current bar and the projection of the linear regression channel calculated for the sample that does not include the current bar.
The calculation formula remains the same H=log(R/S)/log(0.5*N).
I must have expressed myself incorrectly. I meant the influx itself, of course, not the presence of a file. In your algorithm it is formally absent.
And it's really pointless to "nag" the data, my Hurst won't match your Hurst. :o))))
Indeed it is and it's been said a million times in this thread.
It has been said millions of times about the Hearst indicator and the approaches and treatment of it as a Hearst indicator.
I have already tried to explain to you in detail why this calculation from the book is suitable, but apparently you still have your own opinion. Well, you're entitled to it.
I do appreciate the explanations. But I haven't found any confirmation of them. Nothing prevents one from calculating Hearst using these methodologies (various sources do so, including markets).
We are waiting for your algorithm. What if it really turns out to be more accurate? But first you must clearly define the problem for which you are going to look for your "classic" algorithm.
Thanks for your support. I will try my best, hope for further advice and participation from you. :о))))