a trading strategy based on Elliott Wave Theory - page 52

 
Vladislav I wonder if you could answer a few questions....

2) After reading a lot of clever books I forgot what I was looking for :). If I have understood correctly that you mean under a concept of functional of potential energy, it is not clear why we search for it as the result of search will be the equation (not value, but function!) of a trajectory at which movement change of potential energy (during movement, instead of at achievement of an end point!I understand that the price moves along this very trajectory and we have already chosen the equation that approximates this trajectory (regression equation), it remains only to conclude how well we approximate this trajectory. But if we look for it anyway, we may find the quadratic function and if the coefficients В and С in the equation Ah^2+Вх+С are equal (or very close) to those in the regression equation, maybe this is the necessary channel, although I have already started to feel doubt :)


Yes, I came to that too. (I was checking something and found it along the way). That is, by solving MNC equations of derivatives of the sum of squares of deviation, we at the same time solve the problem of minimization of the sum of just deviations. This is true for the case of RMS23>SCO (at least in my case). Although I may have forgotten or confused something. :)(
 
<br / translate="no"> Sorry - was at war with the advisor again - it's starting to hang for a while. So I had to go to "astral" for a while :). But now I've reduced the codes to 7.6K strings :).

Channels are high\low, intervals from 60 to 99.99%. There are no divergent channels in the figure. When there is a channel which is not defined as a convergent one, no matter how long it is, it is not taken into consideration when plotting the projection as channels tend to break through - i.e. the longer price has been in the channel, the more likely its breakthrough is. I do not have the exact criterion to determine that moment (I hope so far) - I use Murray levels, or wave counting, or support/resistance levels, or something else may be invented.
2 Rosh Regarding the parabola - it has an unpleasant side effect - it is impossible to identify the extremum reliably, until it is actually passed. All because of such an unpleasant feature of the second-order line that this line can be drawn through two points in a non-unique way. So it is not very convenient for drawing projections. For confirmation of the passage of the pivot point, however, will do.
That's why I do not use the lines of the second order when drawing the projections.

Good luck and good trends.


There is a simple law of physics - angle of incidence equals angle of reflection. Strangely enough, it works very often:) You can use it somehow to find a possible current parabola, how - I don't know yet.
 
Sorry - I was at war with the EA again - it's been hanging up for a while now. So I had to go to "astral" for a while :). But now I've reduced the codes to 7.6K strings :). <br / translate="no">.


I think we've benefited from that too :).
 
2 Jhonny
If I understood correctly what you mean by the concept of potential energy functional, it is not clear why we are looking for it... <br/ translate="no"> But if we are looking for it anyway, the quadratic function should be found and if coefficients В and С in equation Ah^2+Вх+С are equal (or very close) to those in the regression equation then maybe this is the required channel, although I am already having vague doubts.

Lately I too decided to find out how to apply in practice Vladislav's ideas, which I liked so much. So I want to insert my 2 cents.

1 idea. The price field is potential, so the work of moving the price from one value to another does not depend on the shape of the moving path.
If we assume that potential energy appears as a scalar function of price and time, then any such field will be potential, and the force acting in such a field is equal to the gradient of the potential. So the assumption of potentiality does not provide much in practical terms.

2 idea. The potential energy in the field of the actual price trajectory can be represented by a quadratic form.
The most general form of the quadratic form U(x,y)=A*y^2+B*y*x+C*x^2+D*y+E*x+G. Implying that y is price and x is (as an independent variable) time. It is clear that U(x,y) is defined to the scale factor. Therefore it is possible to put A=1. In addition, the origin U(x,y) can always be moved anywhere. Hence, the free term G can also be neglected.
Отсюда: U(x,y)=y^2+B*y*x+C*x^2+D*y+E*x.
For each fixed point in time this function is a parabola. The price moves along the minimum of that parabola. The minimum is obtained from the condition that the private derivative U(x,y) is equal to 0.
dU(x,y)/dy=2y+B*x+D=0;
From this we get the equation of projection of the minum of potential energy on the (x,y) plane:
y=-(B*x+D)/2 or y=a*x+b - that is the linear regression equation. We find the parameters of this equation based on the current market data using OLS.
Following is a quote from one of Vladislav's earlier posts
Hence one may make an assumption that the trajectory function may be adequately represented by a certain quadratic form - almost simple: searching for extremums of quality criteria functionals for such forms is a rather investigated sphere. That is, it is necessary to select samples, which satisfy the quality criteria in an extreme way.

The trajectory function is, as far as I understand, potential energy. The search for extremums of quality criterion functionals, as I supposed, is something like the principle of least action, only in an integral form. And all this in order to find a trajectory. But we have already found it! And we even calculated the parameters! So I too came to the question asked by Jhonny: why do we need potential energy at all?
Either I don't understand something or I don't understand everything ! :-)

3 idea. The optimization problem is "selection of samples, extremally satisfying quality criteria"(Vladislav). And he's
And the quality criterion is potential energy - see about quadratic forms - nothing unusual.

There is simply nothing to say. What can potential energy give and what can represent such a quality criterion, if in any case, the minimum of potential energy for the quadratic form is always a straight line? What can potentiality give here if the work of forces for any trajectory is the same ? How then is one trajectory better than another?

Dear Vladislav, I simply stated what I understood and what I did not understand in your methodology. If I did not understand something, I attribute it to my stupidity, so excuse me. If you can explain something, I will be very grateful. If not, thank you too!

Sincerely,
 
However, having a system (and even more so a system with a clear rationale) should yield more profits than losers. It's a pity that most often this is discovered after the fact. But it's not over yet, we will automate everything soon :)

 
In general, you can come up with your own "scheme", I can't say it will be easy, but only then will it be possible to understand how it works and how (and why exactly and in no other way) the signals are interpreted.

It is much more effective to create MTSina (which I am now finishing, or rather I hope I am finishing :) and I hope that you are not far from this stage either.

Vladislav, you are absolutely right here ;o) I have designed my "Scheme" and got my first viable, in my opinion, variant of the Expert Advisor. Formally it is my fourteenth Expert Advisor in the last 2 weeks since I started creating it following your strategy described in this thread ;o).
Here are the results of its history run. However I am not going to show you the full statement because it implies the work algorithm of the Expert Advisor to some extend, which you have officially declared as secret information in this branch.
https://c.mql5.com/mql4/forum/2006/06/stat14_results.zip
The Expert Advisor works on the following principle. At the beginning of a new hour bar the Expert Advisor starts. The Expert Advisor calculates the channels, enters immediately into a position if necessary, and sets the Limits. The EA is then launched only at the time of occurrence of the next hour bar. It was specially sharpened for testing such an Expert Advisor in the tester of MT4 using the quick method based on open prices. Accordingly, in some additional calculations of the Expert Advisor, PRICE_OPEN prices were used as the calculation prices. The Expert Advisor code size is a bit more than 4.000 lines of code developed by hand and not quite cleaned (this will be done later, when we will work out the Expert Advisor working method). In every start of the Expert Advisor the channels computation time is approximately 2 seconds. Thanks to the fact that we have developed an algorithm for fast calculation of channels, we are now able to wait for the testing results of the Expert Advisor "in this lifetime" :o). The data presented here was obtained in about 12 hours of calculations on a P4 2.4GHz. The strictest criteria for entering a position were set for testing. As a result, you can see that not all turning points were in play. In the near future we will soften the criteria for entering a position and introduce a variable lot size for opening a position depending on the calculated risk, as was done by Vladislava. In this report, the lot size was fixed at 5USD, leverage 1:200.

PS: I would like to say the following on this subject. This result was obtained during the FIRST run on the history WITHOUT OPTIMIZING!!! Anyone who is engaged in optimization and then in real trading based on optimization results will understand me very well!:o) That is, it indicates a fundamental difference in strategies in the first and second cases. Although trades appeared to be very few during testing, but if we look at the quality of entry points themselves, no one will doubt the efficiency of the system ;o))).

Vladislav, thank you so much again for the STRATEGY!!!!!!!
 
solandr, have the Excel file to help you calculate the deposit through N trades with risk M :)
https://c.mql5.com/mql4/forum/2006/06/optF.zip

I am trying to make a simple Expert Advisor for impulse trading, all functions are ready now (code size is less than 300 lines), but impulse function is not written yet :) (I think it will not take me more than 300 lines). I have laid down the multiframes from the beginning, so as not to return to it again.

 
Of course, I forgot to tell that the Expert Advisor itself has a call of custom indicator(340 lines), but it doesn't matter because indicators are written and debugged for that reason and then they can be used for external calls.

But the infinite loop that draws the channels (in the picture above) and contains an error with re-calculation of Hearst looks like this:
//+------------------------------------------------------------------+ //| script program start function | //+------------------------------------------------------------------+ int start() { //---- while (!IsStopped()) { if (ChannelNotExist()) { FindChannel(); BuildChannel(firstBar,lastBar); } if (isChangedFirstOrLastBar()) BuildNewChannel(firstBar,lastBar); Sleep(1000); } //---- return(0); } //+------------------------------------------------------------------+
 
Actually I inserted the Vladislava indicator (last version) of 470 lines into the script code, as calling external custom indicators is not convenient for me. First of all when debugging. Every time I call an indicator it's fixed in the log, which is not convenient to me. I use only those indicators that are built into MT4 and their calls are not recorded in the log. The Expert Advisor also includes a tabular function for calculating quantiles of 90, 95, 99 and 99.9% probability (all according to Vladislava's recommendations), which also makes up about 630 lines. Also, the Expert Advisor has so far contained a sufficient number of additional functions for drawing various charts both on the price chart itself and on separate windows which are not directly related to trading and can be deleted from the EA. However, it would be premature to do so as long as the system is in debugging mode. Thus, perhaps a lighter version of the Expert Advisor with a minimum of graphical information can be obtained, which will reduce the code by 20-25% in future, provided the Expert Advisor code is thoroughly reworked. Of course, I think it would be impossible to compress my Expert Advisor to less than 1000 lines like you do. And you don't really need it, do you?

solandr , have the excel file for calculating the deposit through N trades with risk M :)<br/ translate="no">
https://c.mql5.com/mql4/forum/2006/06/optF.zi
To be honest, I did not understand anything of that file. It would be interesting to hear your comments. I think that the risk of a deal in Vladislava strategy should be calculated solely on the current price position in the confidence interval and not on the random number generator. As far as I understand it is the random number generator that is chosen as the setpoint for the amount of trades in the file?
 
The Expert Advisor also includes a tabular function to calculate quantiles of 90, 95, 99 and 99.9% probability (all according to Vladislava's recommendations), which also amounts to about 630 lines.


Interesting... And I solved this problem a little differently, found the nete decomposition of the normal distribution function (12 lines) and consider the probability to the second digit, I do not know can it slow calculation (to the expert approaches the current), if it would be interesting I can lay out a piece of code ...

For now on calculation of channels (without Hurst and quadratic functions (as far as white spots, for channels with samples less than about 80 the index > 1, so probably somewhere error)), the shortest channels on the condition of convergence RMS) takes about 5-6 seconds, but my Duron 800 :)
Reason: