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
https://c.mql5.com/mql4/forum/2006/07/var_lot_and_new_sl_tracking.zip
Now the only remaining issue is potential energy of the channel and optimization of the quadratic form ;o).
If figuratively, "on fingers", applying geometric images:
just imagine that on the surface (analog of some rugged terrain) a ball rolls (this is the price). It is not necessary to know the intricacies of the ball's workmanship in order to determine the areas of attraction of the ball's trajectory. It is much more useful to know the properties of this "rough terrain".
Vladislav 14.06.06 21:06
Quite right - I wrote about it, in fact, that a minimum of the potential energy functional serves as one of the criteria for channel selection. And it is a property of the potentiality of the price field, while I am not looking for the trajectory itself due to (again) the fact that all trajectories that fit within the confidence interval must be considered equivalent for a given probability. That is, the construction of projections comes down first to sampling, then to linear algebra.
Vladislav, I think I finally understand what you mean when you mention quadratic forms. You use the following model. Suppose we have a linear regression channel, selected by fulfilling the multicarticle conditions you've already voiced. Then you make an assumption that since the price has traveled along the channel from its beginning to the current point in time, something attracted it (the price) to the position where it is at the current point in time. You choose a potential field model where the minimum of potential energy (zero potential) is a point located within the confidence interval of the channel at its end, i.e. at the current moment in time. This point of course does not necessarily coincide with the current price, but it can happen sometimes. The type of potential field you have chosen is a direct analog of the gravitational force near the Earth's surface, but with the only difference that we take a point instead of a plane (the Earth). Then sum up the gradients for each price bar in the channel and we obtain the potential energy functional of the channel. And assuming that in the potential field a physical object must move along the trajectory in any case minimizing this functional (i.e., the form of the trajectory itself is not important), we find the coordinates of this zero-point potential (or, more precisely, the point at which the potential energy is minimal). It is more correct to say only one of coordinates since we already know the second coordinate (time) since we assumed that it is equal to zero bar.
Next, I have a question about how to use obtained minimum of potential energy of the channel. One way of its use you have already mentioned. You simply select from a series of nearby channels the one that has a minimum potential energy functional. This probably allows you to select channels starting at local maxima/minima, rather than the way it's drawn so far with me (the maxima/minima also fall into the channel sample, but the channel starts a bit earlier, which makes sense using the minimum RMS criterion of the selection). Am I really right in this assumption? Don't you purposely do channel sampling specifically by swings? This, in principle, seriously reduces calculation time.
There is also the following question. Usually we have several channels of different calibre, selected according to criteria. A classic variant is 3-4 channels. One is the largest and the others are smaller, which are actually details of the main channel. We can find minimum potential energy points in the above described manner for each channel. Now knowing the points of minimum potential energy for each channel, how can we use this information to trade? I can make an assumption that from several points an average point is found based on the weights for each of the channels. The weighting factor is equal to the length of the channel. Or the second variant - the point of the longest channel is taken as the average, while the other points do not matter as they are implicitly taken into account by the minimum point of potential energy of the longest channel. Which variant do you use when trading?
Thus, having coordinates of this mean point of the minimum of potential energy we can probably calculate the gradient of potential acting at the current market price, and correspondingly probably more accurately determine the lot size for opening a position, as well as the very probability of such an event, but probably this may require some additional calculations. That is, if desired, the script can calculate the trajectory of this minimum of potential energy for a long period of time (for example, for some years) and obtain statistical data of gradient distribution, which can be used when calculating the current probability of movement (Though the trajectory can be somewhat discontinuous, because there are time moments for which there may not be channels that fully meet the selection criteria, as well as the very appearance and disappearance of a channel). What do you think?
I would only take the difference.
...
And would consider two rows - Bears "Bulls"
Row: Bears - Close[i]-Close[i+1] if Close[i]<Close[i+1] && Close[i]<Open[i]
Row: Bulls - Close[i]-Close[i+1] , if Close[i]>Close[i+1] && Close[i]>Open[i]
for example. :)
If off-topic, never mind, still chewing on this thread :)
I started to carry out calculations according to the proposed methodology and saw that I was most likely wrong in this statement! According to my calculations, it turns out that the minimum potential energy of the channel (the zero potential) for the current moment in time is at the point of location of the current price accurate to a pip (most likely it is just a calculation error). On the one hand, this is logical - if the price started moving at the beginning of the channel having the minimum potential energy, then as it moves towards the minimum potential energy it will finally reach it at the current moment of time. At least, that is how it is calculated. In principle, it should be so - we select the channel for the current moment, that is, the channel that best approximates the price movement from its beginning to the current moment. Well, according to the potential field model, the price trajectory along such a channel will minimize potential energy until the price reaches its minimum. So it is quite understandable that the current price and the minimum of potential energy coincide at the current point in time.
But on the other hand it turns out that this result can only be used to select the channel itself based on its minimum of the potential energy functional but is not suitable for additional forecasting (the field gradient acting on the price at the current time) as I suggested earlier. Too bad :o(. But from the other hand, finding the most optimal channel based on the minimum of functional energy from the series of surrounding channels should improve the prediction accuracy already and that should be useful. Well, let's try to improve our expert by this technique and see what it may eventually result in in comparison with the criterion of channel selection on the basis of RMS minimum.
I again made some erroneous assumptions in a previous post. The point is that I was finding the point of minimum of the functional representing the sum of the gradients themselves, which led me to my previous conclusion. Although if we use the sum of squares of gradients (exactly the quadratic form), we get a point lying on one of the bounds of the confidence interval, if we introduce this restriction specially. Actually, the point of minimum for the quadratic form is outside the confidence range of the channel and I think this potential energy minimum is the target for price movement. Thus, we obtain a forecast of the probability of a one-way price movement to one or another side based on the quadratic form! Let's look into it further.
PS: I am more confident now, that I calculate exactly Hurst's index and calculate it correctly.
:о)))
PS: I am more confident now, that I calculate exactly Hurst's index and calculate it correctly.
:о)))
You're welcome, in general. I was interested in it myself.
And now, thanks to you, I already know the right way even before starting to implement it.
Good luck.
I set the problem as follows. There is a linear regression channel satisfying known conditions.
We need to find the point (t,x) where the sum of squares of gradients (distances from it to price bars lying in the channel) is minimum. According to my calculations, this point has coordinates being an arithmetic mean of the sample both on the time and price axes. That is, this result does not matter for selection of a channel having a minimum potential energy, because the value of this sum of squares of gradients is more important for channel selection. But in order to use this arithmetic mean point of the channel in forecasting - you should either invent something here or it can be a wrong way to do it.
PS: I tried to calculate potential energy for channels in series by proposed methodology. It turned out that the potential energy of the channel, calculated relative to a point with arithmetic mean coordinates, depends solely on the length of the channel. That is, a channel with fewer bars has less potential energy relative to the point with arithmetic mean coordinates. But then it turns out that this selection principle coincides with the principle of channel selection by minimum RMS in a series of channels that I am already using. A channel with a lesser RMS also has lesser number of bars there.
So it turns out that my reasoning has gone far beyond the area recommended by Vladislava. What else can be done in the area of quadratic forms I still do not know :o(. Maybe someone can suggest something on this issue?
I think there is a problem with this statement. Could you please explain where it follows from.
The thing is that you have changed your approach several times, so it is not clear what you are starting from. I think it is better to redefine what problem you are solving, then maybe the situation will be clearer.
Besides, there is a function of potential energy, and there is a functional of potential energy. Generally speaking, these are different things. The minimum of a function (especially for such a simple thing as a quadratic form) is found by methods of matanalysis, while the minimum of a functional is quite different, depending on its representation. What are you working with, a function or a functional? If the latter, then in what representation?
There is also a problem related to gradients. I don't quite understand what you mean by that and how you're trying to work with it. For example:
Maybe you could elaborate on that?
The thing is, I'm also trying to work out the use of potential energy in Vladislav's methodology. On page 26 of this thread I had a post "Yurixx 16.06.06 20:01" where I tried to explain everything I understood and did not understand in this matter, and also asked Vladislav for clarification. Unfortunately he did not reply. And my questions were similar to yours. Perhaps we can work it out together.
Regarding potential - we have a long term channel that has a zero line (regression line), there are smaller channels in this channel and they are moving from border to border for some reason (it's a mystery, isn't it?). We assume that the zero line is the zero-potential energy line and all chattering around it is caused purely by the influence of an external short-term force. Hence, the trajectory of intervention of such force is a quadratic function of . This is such a humpty-dumpty...