From theory to practice - page 531

 
Yuriy Asaulenko:

Writers)). It's easier to call a third-party library through the DLL and then never have to bother with it again.

No. It's not.

If you want to sell a sucker a grail - you have to do it without any third-party dlls.

And all these interlinking is not something I personally like very much. Much better to have everything "native", and built in. Ideally, you could use ported ALGLIB, but I'm happy with my class.

 
Cat Libre Black:

But nevertheless, the question remains.

How do you define 'flat out only'?

Trade the spread of co-integrated assets, for example. It is almost always flat.
 
RRR5:
is complicated, I would like to be in ALGLIB.
What's so complicated about it? You'll have to prepare data anyway - but in my class, you're free to prepare them as you like, the class will request X and Y values via virtual functions, and in ALGLIB - you have to prepare everything and send it there.


The costs are roughly the same. Speed, I think, too.

 
Georgiy Merts:

No. It's not.

If you want to sell the Grail to a sucker, you'll have to do it without any third-party dlls.

And all these interlinking is not really appealing to me personally. Much better to have everything "native", and built in. Ideally, I could use ported ALGLIB, but I'm happy with my class.

Why sell a sucker a Grail for 3 kopecks? It will come in handy.))

I didn't even get a free one from Market.) I didn't agree with the moderator about the restrictions.) You know, no limits.

 
Yuriy Asaulenko:

But it builds it disgustingly.) However, for many applications this is more than enough.

Nevertheless, EMA remains the best among other "standard" MAs in absolutely all parameters. The only thing it has a problem with is smoothing period - it does not really conform to anything. Because of this, it is absolutely incorrect and meaningless to compare EMA with other MAs at the same T.

For more information on the EMA period see https://www.mql5.com/ru/forum/165546/page2#comment_3974141.
О запаздывании скользящих средних
О запаздывании скользящих средних
  • 2017.01.05
  • www.mql5.com
Говорят, что значения EMA "ближе" к последним курсам, чем SMA. Задумался, стал считать...
 

I told you that the T parameter in the EMA has nothing to do with reality and the comparison is incorrect.

 
Yuriy Asaulenko:

I like Butterworth better, and for good reason.

But that train, at the link, is no longer relevant - long gone.

I have a lot of "improved" MAs in kodobase, but I can't say anything definite about them - I don't know, I haven't tried them.

In mql version ema requires its previous value to be calculated, for other mashes you need more values or many times more values. On the plus side, you can catch twitching of ema where Butterworth is not twitching, or to make it look nice and smart. With all the variety of wipes, there is no (maybe I haven't noticed) ema with coefficient calculation - kind of obvious academic adaptability of ema. But for a normal trigger, the standard ema is sufficient.

 
"Non-linear ISC.
The ALGLIB package supports non-linear approximation using a user-defined function."
http://alglib.sources.ru/interpolation/leastsquares.php
 
Novaja:

Something tells me that Smokchi wants to get this effect without redrawing, because if we take only the last point each time, and discard "redrawing", then our channel will loop like crazy and there won't be such a beautiful picture. It's like for example, uh..., no picture on the chart at hand, it would be clear at once, we take LR on mashki (Vinin had formula 3*LWMA-2*SMA in kodobase) I drew). The green dots are tics. MA, if you do it as LR, has rectangular window, then it will be redrawn too (so that the mashka can draw if you want)), SMA itself does not redraw and LRMA also does not redraw, but it is no longer a beautiful picture. By the way, it is very easy to calculate LR angle from here, via tg.

P.S. On a forum even through dummies counted polynomial of degree 2, quadratic LR and someone else tried to raise his hand at polynomial of degree 3.

You don't need to count anything through Tangens.

3*LW-2*SM right regression point

4*SM-3*LW left regression point

you subtract the left point from the right one and divide by the number of gaps (steps).

3*LW-2*SM - (4*SM-3*LW) = 3*LW+3*LW -2*SM -4*SM = 6*LW-6*SM

(6*LW-6*SM)/(PERIOD-1) = (6/(PERIOD-1))*(LW-SM)

Get 6/(PERIOD-1) counted once in OnInit, then multiplied by the difference LW-SM, this is the angle of slope, or step regression, whichever is convenient.

 
RRR5:

I meant how to do it in mql, using the ALGLIB library.

ALGLIB is written in such a way that you can make a .dll from it, while using ALGLIB is very difficult, you have to "google" each function, it takes a lot of time, there is no information on the Internet, only questions))

I have only managed to make ALGLIB work with linear algebra so far, but I have killed almost a week in order to use it - I have to do a lot of tests to find analogies of functions with Matlab

I.e. it is easier to check ideas in Matlab (or make them in MQL from the scratch) and if you want to port an idea to MQL, you will have to study ALGLIB

Reason: