From theory to practice - page 530

 
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 problem with its smoothing period is that it really does not fit anything. Because of this, it is absolutely incorrect and meaningless to compare EMA with other MAs at the same T.

To compare the polynomial indicator and the waving indicator over the same period is also not correct.
 
it was writtenhere that you can do regression on any function in algibe.

I only found linear regression in this library.
http://alglib.sources.ru/dataanalysis/

How can I use the MNC method in alglib by specifying my own function?
 
Smokchi Struck:
it was written here that you can do regression on any function in alglib.

I only found linear regression in this library.
http://alglib.sources.ru/dataanalysis/

how do you use the rnc method in excel by specifying your function?

To use ANC, you have to linearise your function beforehand.

 
Yousufkhodja Sultonov:

To use an ISC, you have to linearise your function beforehand.

how?


how to linearise the function y=ax2+bx+c?

 
Smokchi Struck:

how to linearize the function y=ax2+bx+c?

What's so hard? Define your parabola, and approximate the straight line with it in Excel. It's even possible to derive the formula directly.

And buddy, you should have a normal name instead of your stupid nickname... I don't know what kind of structure you're suggesting...

 
Georgiy Merts:

What's so hard? Define your parabola, and approximate the straight line with it in Excel. It's even possible to derive the formula directly.

I meant how to do it in mql, by means of ALGLIB.

Georgiy Merts:

And, my friend, you should give yourself a normal name instead of your stupid nickname... It's not clear what kind of string you're suggesting...

a linguist? )))

 
RRR5:

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

linguist or something? )))

Well, not that I'm a linguist, but I'm interested.

Here, at least such a nickname is much better. With your old one, it wasn't interesting to help. Even with this new one, it's much better.

I've personally made a regression without using ALGLIB, it wasn't there yet. I'm attaching the class LSMCore - the kernel of approximation, it calculates coefficients in polynomial regression from zero to the third power by choice, using an array of points.

You need to inherit from this class and overload the functions:

virtual uint   _N() = 0;                // Число точек
virtual double _X(uint uiIdx) = 0;      // Значение X точки с индексом uiIdx
virtual double _Y(uint uiIdx) =0;       // Значение Y точки с индексом uiIdx

After that - you call the _CountLSM(ELSMType ltType) function;

It takes a regression type - from flat to cube, and returns the coefficients of the polynomial in the SLSMPowers structure.

Use it, all the approximation graphs above - use this very class.

Files:
LSMCore.mqh  14 kb
LSMCore.mq5  36 kb
 
Georgiy Merts:

Well, not exactly a linguist, but interested.

Here, at least a nickname like this is much better.

Personally I've made a regression without using ALGLIB, it wasn't there yet. I'm attaching LSMCore class - approximation kernel, calculates coefficients in polynomial regression from zero to third degree by choice, by array of points.

It is necessary to inherit from this class and overload functions of number of elements and getting pairs X-Y.

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

 
Georgiy Merts:

Well, not exactly a linguist, but interested.

Here, at least a nickname like that is much better. It's just that your old one wasn't much fun to help. And even with this new one, it's much better.

I've personally made a regression without using ALGLIB, it wasn't there yet. I'm attaching the class LSMCore - the kernel of approximation, it calculates coefficients in polynomial regression from zero to the third power by choice, using an array of points.

You need to inherit from this class and overload the functions:

After that - you call the _CountLSM(ELSMType ltType) function;

It takes a regression type - from flat to dice - and returns the polynomial coefficients in the SLSMPowers structure.

All approximation graphs above use this class.

it's complicated, I'd like it in ALGLIB.
 
RRR5:

You don't know at what point a flat will turn into a trend.

I do know that.
Reason: