a trading strategy based on Elliott Wave Theory - page 32

 
At the same time
the last script variant for calculation of the regression channel and Hurst index that solandr presented as correct uses the error array for calculation of the slope, and the spread is calculated as the difference between High and Low in the sample

This is not exactly true! Read the whole thread carefully! I wrote further in my posts that I carry out the calculation exactly as Vladislav recommended and not as it was in my last script, i.e. the RMS is calculated by the errors obtained using the difference between the current price and the projection of the linear regression channel built on the sample until this bar, i.e. without including this bar. The last script was published as a question to Vladislav to which he has already fully answered. I have written clearly that the method recommended by Vladislav gives more accurate information and is a VERY IMPROVEMENTATION to the method of calculating the Hurst parameter, which is described in all books! Here is my post again, which I mean, just in case.

In my last variant, a linear regression is first constructed for the sample and the difference is counted between the real bar price and the linear regression equation constructed for the whole channel at once. But I understand that you are using a different calculation method?
So, as far as I understand, the algorithm for calculation of Hearst's parameter by your methodology should be as follows:
1. We take a sample of points for which we want to obtain the Hearst parameter. For example for clarity, let us take a sample of points from 0 to N.
2. Let's take successively a part of sample from 0 to M where 0<M<=N. That is theoretically we have N samples having the following ranges: 0-1, 0-2, 0-3, 0-4,...0-(N-1), 0-N.
3. For each sample we construct a linear regression channel. We get an array of channels and their projections into the future.
4. Calculate the difference between the closing price of the bar M and the projection on this bar of the linear regression channel, constructed for the sample 0-(M-1). That is, the data of the linear regression projection plotted for the PAST, not including the current bar, is taken when calculating the difference? Right?
5. Then we have such an array of differences from which we determine the RMS (S)
6. We find R as a difference between maximal and minimal values of the sample
7. Calculate Hearst parameter.
Now do I understand correctly how to calculate Hearst parameter or not?
If I understand your idea correctly, it seems to me to be a VERY IMPORTANT addition to the method of calculating the Hearst parameter given by the formula in the book. No emphasis is placed on this circumstance of the calculation.


Vladislav, in principle I have already completed the search for channels based on linear regression. And I've probably made Hearst's calculation in full accordance with your recommendations (predictions calculation for each bar separately). And I think that Hearst's calculation for each bar contains more useful information that I am still comparing to but trying to use in practice.


I would also like to clarify on the Hurst coefficient. Judging by the questions already asked about it, there is a complete misunderstanding of the physical essence of this parameter! I will try to explain it as best I can. In simple words, we are trying to compare the maximal range of the entire sample, i.e. the range of prices in the sample with the standard deviation of prices from the approximating function (according to Vladislav's recommendations, we take the forecast value). In other words, it is from here that we must take the difference between high and low of the sample when calculating the maximal range, as the price has visited these extremes during the period of time mentioned in the sample. As for the RMS error, you can take any variant of price. I personally think it the most reasonable to perform all calculations for a sample in which each bar is represented by its average value (O+H+L+C)/4. And it is with these values that I perform all channel calculations. I think it is reasonable as it gives a more centered estimate of parameters in the channels. And now about the most important parameter. It conventionally shows the ratio between the size of the teeth of the sample and the maximal span of the sample. In this thread I attached pictures of different variants of Hearst's coefficient (even though they were calculated using linear regression channel for the whole sample at once, and not by Vladislav, but they are quite suitable for explanation on the fingers). Generally speaking, when the Hearst's coefficient is significantly less than 0.5, then the sample's teeth are very noticeable, i.e. people start twitching like let's go in the opposite direction and on one of the next teeth more and more people start thinking the same way and the channel turns in the opposite direction. When the coefficient is noticeably larger than 0.5 there is practically no crazy to go against the trend and the price goes quite smoothly without any noticeable dents in the direction of the trend. And if Hurst reduced the coefficient to those parameters that we had, it is just a convention! He might as well have led it to any other convenient numbers. For example I can simply recommend to subtract 0.5 from Hearst's figure and then you will have a range of negative numbers for a counter-trend and positive numbers for a continuing trend.

PS: In general I just recommend reading everything written in this thread again. After all, Vladislav has already answered almost all the main questions there and now we are simply repeating them. The whole mathematics behind everything is in the book by Bulashev "Statistics for Trader" from the Spider's website. Why re-invent the wheel again and analyse the variants of the SKR calculations when everything is already described in the book?
 
2 Rosh<br/ translate="no"> ran solandr's processed code through history on several currencies with Print - the coefficient is within 0.2~0.4 Is it correct?

It's absolutely senseless to run the Expert Advisor through history calculating the Hearst coefficient with a fixed sample window!
The Hearst coefficient makes sense only for samples that satisfy the optimality conditions in the most extreme way. The method of calculation is given in the previous post. Channels approximated by functions of different order should be calculated using the same functions, respectively. It should be clearly understood that the Hurst index is not a tool, on the basis of which you can draw any conclusions about the market entry or exit! It simply helps to answer the question of what may become of the channel for which the Hearst parameter was calculated in the short term - whether we should hope for its continuation or for a reversal of the channel?
Vladislav wrote in the very beginning that it is no less effective even without the Hearst parameter. That is, the parameter itself is, if you like, a mathematically based property of the sample, showing the ratio of the sample's chatter in the channel to the path the channel took on that very sample and nothing else! Sort that out, please.
 
<br / translate="no"> Vladislav wrote right at the beginning that it works just as well without the Hurst parameter. That is, the parameter itself is, if you like, a mathematically valid property of the sample, showing the ratio between the chatter of the sample in the channel to the path that the channel took on that very sample and nothing else! Sort that out, please.


Actually there's nothing to add :). I'm just too lazy to repeat everything several times.

Good luck and good trends.
 
Not much to add :). I'm just too lazy to repeat everything several times.


That's a pity. The question I asked could have been answered in one specific sentence. It was not necessary at all to repeat what has already been said.
As a physicist I am used to understanding the meaning of the formulas I use. If you count the cramps by errors, and the spread as High - Low, then, from my point of view, it makes no sense. And besides it contradicts the scheme of calculations given, for example, by Peters. However, the fact that I do not understand something is certainly my problem.

solandr, you are absolutely correct in understanding the meaning of the Hurst Index. There is even a special term for it in the market - volatility. There is only one nuance. The Hearst Ratio can be a measure of volatility if both the slope and the spread are calculated for errors. And in this case it does not matter at all at what angle the linear regression channel passes, maybe even at zero (i.e. there is no trend).
And in fact, the linear regression unit p=a*t+b is just a linear transformation of the coordinate system (t,p), which rotates it in such a way that the t axis coincides with the regression line. Therefore it is a strong, but personally incomprehensible move to take the approximation errors for the price calculation from the new coordinate system and the prices for the spread calculation from the old one.

Vladislav, please explain this to me as a mathematician. Silly me, I don't understand it ! It has nothing to do with the subtleties of implementing your strategy. Just a general question.
 
<br/ translate="no"> solandr, you understand the meaning of the Hearst index quite correctly. There is even a special term for this in the market - volatility. There is only one nuance. The Hearst Ratio can be a measure of volatility if both the slope and the spread are calculated for errors. And in this case it does not matter at all at what angle the linear regression channel passes, maybe even at zero (i.e. there is no trend).
And in fact, the linear regression unit p=a*t+b is just a linear transformation of the coordinate system (t,p), which rotates it in such a way that the t axis coincides with the regression line. So taking the approximation errors for prices to calculate the slope from the new coordinate system, and prices to calculate the spread from the old one - it's a strong, but I personally don't understand it.


Here I agree with Yuri. But only purely theoretically, as practically I haven't done anything in this direction yet. I read that lecture (at the Astronomy Department I think), and understood the Hurst exponent exactly as a normalized spread (normalized by RMS) on the example of a dam .
 
In the end I tried standardising the period, when calculating the Hearst coefficient, by linking it to time, and running it through history.
But somehow, somehow... um... yeah. Somehow I haven't got a special wand to see where one channel ends and another begins.
So I'm probably losing interest in using the Hurst coefficient at the moment. But these are my conclusions and observations, maybe I'm wrong and am missing something.
Most likely the effectiveness of the Vladislava system is due to a more comprehensive approach and tactics, inputs and outputs.

Alexander.
 
***************************
 
solandr, you are absolutely correct in your understanding of the Hearst index. There is even a special term for this in the market - volatility. There is only one nuance. The Hearst index can be a measure of volatility if both the slope and the spread are calculated for errors. In this case it does not matter which angle of the linear regression channel passes through it, it may even be zero (i.e. there is no trend). <br / translate="no"> In general, the linear regression unit p=a*t+b is only a linear transformation of the coordinate system (t,p) that rotates it in such a way that the t axis coincides with the regression line. That's why it's a strong, but personally incomprehensible move to take the approximation errors of prices to calculate the slope from the new coordinate system and prices to calculate the spread from the old one.

Maybe, volatility and Hurst index are "slightly" different things ;o). I will quote from "Chaos" on this link https://c.mql5.com/mql4/forum/2006/06/Xaos.zip
I generally adhere to exactly the point made in this excerpt from the book. No one can explain it better than in the book.
Well, maybe Vladislav can add something else to explain it?
 
Eventually I tried standardising the period, while calculating the Hearst coefficient, by tying it to time, and running it through history. <br/ translate="no"> But something, somehow... m...yeah. No special wand to see where one channel ends and another begins, somehow it didn't work out.
So I'm probably losing interest in using the Hurst coefficient at the moment. But these are my conclusions and observations, maybe I'm wrong and am missing something.

Well of course you are wrong! The fact that those channels on which the strategy is based, one by one, do not disappear and do not disappear in the sense that you have or what everyone would like to have (you will just have to wait a long time until you see the destruction of the channel, but it will not give you anything, because it will already be history ;o)). Often there are several channels and the picture showed by Vladislav, demonstrates it very well, though frankly speaking, I thought that Vladislav would not show it, as it strongly confirms everything stated in this thread ;o)!
Most likely the effectiveness of the Vladislava system, due to a more comprehensive approach and tactics, inputs and outputs.

Well of course it's a whole SYSTEM, not a single channel-indicator that every trader in the world covets! And it's possible that it's quite difficult to grasp the essence of the system from the get-go. In fact, in one of my posts, I wrote that even if you put the system algorithm on the Internet and send links to it to all the traders in the world, only a few people will program and use it. Since the algorithm itself has already been sufficiently described in this thread, then I can make a brief summary of it, based on the fact that Vladislav shared exactly the information he thought necessary, knowing that publishing information on the Internet forum implies its free sharing and use by other forum visitors.

1. Channels that meet the criteria of RMS convergence and non-falloff of the sample outside the 99% interval are found. The channel with the lowest RMS value is selected from the series of bar-to-bar channels. In this case, channels are built both on the basis of a linear regression and on the basis of a quadratic function (relatively speaking, a function of the form y=a*x^2+b*x+c, which during the implementation is divided into two functions - the linear regression equation and the parabola, which allows us to make estimates of errors)
2. For the selected channels, we calculate the Hurst coefficient using those functions that were used as the basis for approximation of these channels.
3. The confidence intervals of the channels are plotted.
4. With the channels being plotted you can calculate the probability of continuation/reversal of the trend at any point where the price is. So far, I personally have not worked out anything better than to average the probability by all channels using weights, i.e. the longer the channel, the stronger its influence is. In general, I take the sum of probabilities for each channel with weights equal to the number of bars of each channel divided by the total number of bars in all channels and thus find the total averaged probability.
5. This average probability value allows estimating the risk of opening a position in the current point, and I suppose that Vladislav uses this value to calculate the lot volume for opening a position. So, it is clear that if the price has just fallen out of the 60% boundary, the lot will be a penny, but if the price reaches somewhere near the 95% boundary, why not put 20% of the deposit on the stake? After all, even if this transaction takes away 20% of the deposit, the rest of the money you can make another 2-3 transactions of this scale, which will bring a profit knowingly covering the losses of the previous unsuccessful operation. At the same time, the probability of getting 2-3 unsuccessful deals of this scale is extremely small, which allows making them despite the contradiction to the money management law!:o)
6. Next, everything is very simple. There are Murray levels. We look at the levels the price reached and think what the price can do further. If we believe (on the basis of the probability, calculated in 4 points) that the price reversal is possible, then we just wait for confirmation that the price has changed and open a position in the corresponding direction by the lot size, calculated in 5 points. Stop Loss 50-100 pips, determined depending on the situation or at the boundary of 99.9% of the interval, given the strong levels of Murray, located near this boundary (ie, probably better to put a stop at a strong level of Murray). Takeprofit should probably be set to levels on the other side of the confidence interval (average) just looking at the Murray levels on that side and thinking about which of them would stop the price. Confirmation of a price reversal is made on the basis of the lowest channel that satisfies the optimality criteria described in point 1. We also use classical TA in this case. For example I plan to use a trivial crossover of two MAs for confirmation. Probably you can look at the oscillators as well. I personally really like OsMA indicator.
7. Then we monitor the price movement. Exit upon reaching the TP, or when the conditions for reversal from the other half of the confidence interval described above are formed, or the Hearst coefficient of the channel indicates the trend destruction (turning it into a contrend), etc. All that I have not considered yet, but that should be considered when trading. The stop should probably be moved to Breakeven or to a small profit when the price has reached the 50% boundary, i.e. when the situation is completely undetermined.

In general, I have tried to summarize the Vladislava system. And it seems to me that this is ALREADY enough to start making a profit in Forex. So, in accordance with this direction I am trying to trade. So far, I can note that I have seen a noticeable increase in percentage of successful trades. As soon as I get used to it and accumulate a number of deals that may have some statistical validity I may post them here on the forum. I'm trading on real account but with penny lots for now. Since I've understood long ago that it's better to trade one kopeck on the real account than millions on the demo. It seems to me that it's just more convenient. And I think it kind of trains moral fortitude, which is so necessary in this business. That is, you need to cultivate a desire to go where you need to and where everyone will go then, rather than give in to the momentary desires of the crowd at the news, which suddenly snapped and ran headlong and do not know where and why.
 
I generally stick to the essence of what is stated in this excerpt from the book. I don't think anyone can explain it better than the book itself.

Good morning, solandr!
Although we generally hold similar views, I don't agree with you in this quote. "Better than in the book itself" can be explained by many. Me, for example, or you. There are books and books and books. Especially now that anyone who can pay for a print run can publish their favourite. So don't make a prayer book out of print. :-)
And the point that is made in this passage has both true and false sides. Which one do you adhere to ?
You are absolutely correct in that
Volatility and the Hearst index are probably "slightly" different after all

And I didn't claim otherwise. "Can be a measure" and "is" are also different things, after all. The point is that the traditional approach, which assumes that price movement is a random, normally distributed process, uses sko as a measure of volatility (and in your quote they are altogether identified). However, as we know, the normal distribution does not apply to the market, and therefore the sko cannot be a measure of volatility. Neither can the Hurst index, since it "measures" the deviation of a system's distribution from the normal one. That is why, while nobody has figured out how to combine these two things, when estimating the volatility one must take into account both sko and Hurst values.
I think that is what Vladislav is doing.
Reason: