a trading strategy based on Elliott Wave Theory - page 45

 
if((H[k-1]<H[k])&&(H[k]>H[k+1])&&(H[k]>curHi)) для минимума аналогично.

All that remains is to justify the choice of a sufficient area around the High to take it as the High of the given sample. I take it that this High should be a maximum point within a radius of +-30% of the sample length? In case it is not so, the sample needs to be increased in order to determine two things together - the extremum and the sample length? What are your thoughts on this?

If you simply select an extremum on a given interval (i.e. the highest high (the lowest low)) out of three bars and select the highest (the lowest), you should basically get what you need. Although, it would probably make sense to verify that the sample length from such an extremum is sufficient, i.e. all the criteria should work. I will experiment

Vladislav, do you suppose you will correct the code of the Murray indicator in the light of the new information? We are waiting for the new version ;o)!


Yes, it's not hard to straighten. However, if necessary, I will fix it.

Good luck and good luck with passing trends.
 
If we simply select an extremum (i.e. the highest high (lowest low)) out of three bars on a given interval and choose the highest (lowest) one, we should, in principle, get what we need.


Finding what you need can be done very simply by sorting a two-dimensional array.
There are 2 columns in the array: 1st = High, and in the 2nd we write the bar number.
The sorting (in MQL, it is performed on the first column) puts maximum on the first one, and minimum on the last one (or vice versa),
and minimum on the last position (or vice versa, depending on the sorting mode).
The bar number is read from the second column.

I don't know how much time it will take, though.
 
Greetings to all the few active members of this very interesting thread :-)
At the moment I'm trying to figure out the method Vladislav generously gave us, which means searching through all 23 pages. While searching, I'm of course examining the pieces of code that the panelists have chosen to publish. I understand that the code on pg. But nevertheless, just in case, I want to draw your attention to the fact that I think the error dispersion calculation function contains an error which causes the calculation to be inconsistent with the formula and causes possible division by zero errors in runtime.
double dispercia_oshibok(double data[], double centr) { int k,size; double disper=0; size=ArraySize(data); for(k=size-1;k>=0;k--) disper=disper+MathPow((data[k]-centr),2); if(size>1) disper=disper/(size-2); return(disper); }



Perhaps the line if(size>1) disper=disper/(size-2); would be more correctly written as if(size>1) disper=disper/(size-1);

Please confirm or refute my conclusion, for I, unfortunately, cannot move on without finding out the smallest details. :-) Thank you in advance.

 
Read on - it will answer the question.
 
Oh... gentlemen. All you have to do is say "so" or "not so". :-) I've read the whole thread. Probably missed it, so I'll search again. While searching I found an interesting site with various algorithms: http: //alglib.sources.ru/ I hope I won't consider it an advertisement. :-)
 
In our case size>=30 and the formula is disper=disper/(size)

ZS This is better ? :)
 
In our case size>=30 and the formula would be disper=disper/(size)<br / translate="no">
SZZ that better ? :)


Not at all. :-) Now I need to fix the "roof" urgently, because long-suffering Bulashev in "4.3 Estimation of dispersion and standard deviation" in the formula for calculating the dispersion in the divisor is present N-1.
Where's the wood coming from, Rosh ??? :-)
 
ee. :-) Now I need to fix the "roof" urgently, because the long-suffering Bulashev in "4.3. Estimation of variance and standard deviation." has N-1 in the formula for calculating variance in the divisor. <br / translate="no"> Where's the wood coming from, Rosh ??? :-)

In fact when we are estimating the variance of the approximation errors, rather than the data sample itself, the denominator should of course be N-2. https://c.mql5.com/mql4/forum/2006/06/disp_oshibok.zip
Bulashev even gives a concrete example in his book on this point.
 
<br / translate="no"> Actually when we are estimating the variance of the approximation errors, not the data sample itself, the denominator should of course be N-2.


Yep. Thanks. Got it now. I'll read this piece more carefully.
In this case we'd better write the condition as "if(size>2)" not to tempt fate. The code must be stable :-)
 
In that case, the condition should be written as "if(size>2)", so as not to tempt fate. The code must be stable :-)

It's as plain as day!:o)))
That made-for-hire script was published as a question for Valadislav and not for practical use.
In the code I have at the moment the variance is calculated without calling a special function to save the calculation time and also checks
if(size-2!=0) disper=disper/(size-2);
in general I think that such programming trivialities are not worth discussing in this thread at all.