a trading strategy based on Elliott Wave Theory - page 89

 
Jhonny 17.07.06:40
<br/ translate="no"> If I understand you correctly, this is not correct as the deviations for 2/3 are counted from another regression line. Try building a channel at a certain length and another one at 2/3 and you will see that the lines do not coincide and hence the sum of the deviations will be different (maybe that is what you meant?). As far as I understand the variance or RMS itself cannot be used to calculate subsequent values since every new bar gives a new line and changes the entire variance, in theory it cannot be calculated from the variance obtained on the previous bar. I seem to have managed to take it into account in this cycle and even the channel plot by two thirds looks ok (when regression coefficients are calculated we also calculate the sum of CB squares and the sum of CB itself therefore we can use them to calculate the dispersion on the next bar, but the dispersion itself did not work out) but when I made the RMS file and looked more carefully I found some strange things happening on every 3 bars.(although I seem to have taken into account the unequal movement of 2/3 interval bounds)


At some point I was ready to admit that I must recalculate the parameters of the linear regression and the RMS on 2/3 of a channel (technically there are no problems here). But now I have doubts. When the channel becomes obvious, it gets better and better as a self-fulfilling prophecy. At the same time the RMS is getting smaller (price is walking more and more precisely within the channel boundaries). This is probably what we are testing when we require 2/3rds of a channel to have a larger RMS than the full length of the channel (the channel is the same in both cases). I will probably check the option with the new calculation of LR parameters and RMS at 2/3 of the sample at some point too.
 
2 Rosh
For example, a channel developing according to this scenario would not be taken into account by the RMS2/3>RMSCO criterion, although I think the last third does not fall outside the 99% range
 
As the channel becomes apparent, it becomes better and better as a self-fulfilling prophecy. At the same time, the RMS becomes smaller (price moves more and more accurately within the channel boundaries). I guess that's what we're testing when we require 2/3rds of a channel to have a larger RMS than the full length of the channel (the channel is the same in both cases).

Absolutely agree.
 
Интересно... А я решил эту задачу не много инече, нашел в нете разложение в ряд функции нормального распределения(12 строк) и считаю вероятность с точностью до второго знака, не знаю может это замедлит расчет(к эксперту тока подбираюсь), если будет интересно могу выложить кусочек кода...

I also found a quantile calculation on the ALGLIB.SOURCES.RU website. But somehow there were not 12 lines and one function required calculation of others. I wrote about it in this thread before. So I think the approach used on this site would have slowed down the Expert Advisor. So if you actually have 12 lines of code that do the same thing, then everyone would be interested to read them. I use a quantile table with 3 decimal places. I think that 2 decimal places won't change the whole picture of work, but it will be useful for everybody.


Greetings all.
And I calculate quantiles of Student's distribution in ONE line of code (I mean one line per quantile). The errors from the "Excel" version of the calculation are in the 4th digit, provided that n>=30. I can post it here for all to see, or send it to "email" - as you say.
 
2 Rosh
A channel developing in this scenario, for example, would not be taken into account by the RMS2/3>RMS, although I think the last third would not fall outside the 99% range


I understand that the picture was drawn manually, as I can see that the CCO2/3 < RMS.
 
And I calculate the quantiles of the Student distribution in ONE line of code

One line can be done here too. Put it out there. :-)
 
Интересно... А я решил эту задачу не много инече, нашел в нете разложение в ряд функции нормального распределения(12 строк) и считаю вероятность с точностью до второго знака, не знаю может это замедлит расчет(к эксперту тока подбираюсь), если будет интересно могу выложить кусочек кода...

Я тоже находил в инете расчёт квантилей на сайте ALGLIB.SOURCES.RU. Но там как-то совсем не 12 строк оказалось и одна функция ещё требовала расчёта других. Я про это писал в этой же ветке ранее. Так что думаю, что подход, использованный на этом сайте, внёс бы свою лепту в торможение работы эксперта. Так что если Вы действительно обладаете 12 строками кода, которые делают то де самое, то всем будет интересно ознакомиться с ними. Я использую таблицу квантилей с 3-мя знаками после запятой. Думаю, что 2 знака после запятой не изменят принципиально всю картину работы, но польза будет всем.


Greetings all.
And I calculate quantiles of Student's distribution in ONE line of code (I mean one line per quantile). The errors from the "Excel" version of the calculation are in the 4th digit, provided that n>=30. I can post it here for all to see, or send it to "email" - as you say.



It would be interesting to have a look. I've implemented the normal distribution function bluntly - through an array of numbers. I wanted to do the same for Student's distribution, but once again I looked at the difference between normal and Student's distributions and spit - "if there is no difference - why pay more".
 
<br / translate="no"> I take it the picture was drawn by hand, as I can see by eye that CKO2/3 < CKO.

Of course I did it manually, I didn't waste my time looking for such a situation on the chart, I said in principle it is possible and selection on the criterion CCO2/3>SCO will cut it off but it seems to me not worth it
 
А я рассчитываю квантили распределения Стьюдента в ОДНУ СТРОЧКУ КОДА

One line can be used here as well. Put it out there. :-)



deltaY_P90=(1.57/n+1.6447)*CKO; deltaY_P95=(2.47/n+1.9595)*CKO; deltaY_P99=(6.0/n-MathPow(0.32/n,0.8)+2.5758)*CKO;



Where deltaY is half of the uncertainty bandwidth
n - number of degrees of freedom

For each quantile I derived simplified formulas. I can't attach a picture of the error graphs. Estimate the errors yourselves.

 
Learning how to insert pictures. Errors in simplified formulas for calculating quantiles.



[img]https://c.mql5.com/mql4/forum/2006/07/%D1%F2%FC%FE%E4%E5%ED%F21.gif [/img]