Out of sporting interest, I engaged in adaptive quote filtering - page 10

 
nikitasa1997:

I have synthesized the Chebyshev filter coefficients using MATLAB, i.e. denominator and numerator of the filter (the coefficients are attached below). Now the main thing: how to implement a Chebyshev filter with specified coefficients in an indicator using MQL4? Please help.

Look, you got the numerator and the denominator, i.e. you can write the transfer characteristic in the form

H(z) = P(z^-1)/Q(z^-1),

where P and Q are your numerator and denominator as polynomials of z^-1 (z minus first power). The transfer characteristic is the output divided by the input, i.e. in z-form

Y(z)/X(z) = P(z^-1)/Q(z^-1),

whence

Y(z)*Q(z^-1) = X(z)*P(z^-1).

Now recall that z^-1 is nothing but a delay operator, i.e. multiplying by z^(-n) in the z-domain corresponds to a delay of n counts in the time domain, e.g. Y(z)*z^(-3) corresponds to y(t-3). Thus,

a0*y(t) + a1*y(t-1) + a2*y(t-2) + ... = b0*x(t) + b1*x(t-1) + b2*x(t-2) + ... ,

where ai, bi are coefficients of the former denominator and numerator, respectively. Actually, all you need to do is to express y(t) - here you have the formula for calculating your indicator.

By the way, it's a bit strange "to have an idea of digital filtering" and not be able to do it...

tara:

And in general - what is adaptivity?

In the case of digital filters, adaptivity usually refers to the ability to automatically adjust filter coefficients depending on certain characteristics of the input data. For example, in Kalman filter coefficients are calculated at each step based on tracking error and certain formulated optimality condition.

PS the topic came up unexpectedly...

 
transcendreamer:

have also come to this conclusion... some indicators have the prefix "with zero lag" - this is a lie

Strictly speaking, no (although I couldn't agree more, in the vast majority of cases it is a lie)).

When one speaks of lag, one most often refers to a linear model. For linear models, non-zero lag is a consequence of the principle of causality; in other words, it is impossible to implement a linear system that satisfies both the principle of causality and the zero lag requirement.

For non-linear (e.g. adaptive) models there is no such limitation. There the lag can be both zero (perfect tracking properties) and negative (predictive properties). A prerequisite for this is that the model is adequate to the real system.

 
Zhunko:

The derivative of sine is cosine. Runs ahead 90 degrees. The derivative is essentially a high-pass filter. And nothing is redrawn.

I think with that kind of knowledge, even a tip like that wouldn't help to take advantage of it.

So you're comparing the market to a sine wave???? Well... Good luck.....
 

And noxa is an addon for the nerf. It's hard to adjust. But for sure it does not overdraw and gives signals in any way. But if you can set it up :-)

I would like to play it again, but I don't want to install it :-(

 
nikelodeon:
So you're comparing the market to a sine???? Well... Good luck.....
The diagnosis is a complete lack of abstract thinking :-(
 
nikelodeon:

And noxa is an addon for the nerf. It's hard to adjust. But for sure it does not overdraw and gives signals in any way. But if you can set it up :-)

I really feel like playing it again but I don't want to install it :-(

Thanks, now I know what the noxa is.

I wish I could port it for MT, but I guess all the algorithms are locked

 
alsu:

Strictly speaking, no (although I couldn't agree more, in the vast majority of cases it is a lie)).

When one speaks of lag, one most often refers to a linear model. For linear models, non-zero lag is a consequence of the principle of causality; in other words, it is impossible to implement a linear system that satisfies both the principle of causality and the zero lag requirement.

For non-linear (e.g. adaptive) models there is no such constraint. There, the delay can be both zero (ideal tracking properties) and negative (predictive properties). A necessary condition for this is that the model is adequate to the real system.

Yes, that's right.

Let's create an indicator, buffers: 1. Opening price (actual); 2. Closing price (actual); 3. Stop loss (if there is an opening price); 4. Target function value based on modeling results inside the indicator.

We use the indicator both for opening/closing positions and for dynamic optimization of parameters (adaptation) of trading tactics.

 
Alsu, we have to get married. Sorry.
 
Zhunko:
The diagnosis is a complete lack of abstract thinking :-(
What does the abstractness of my thinking have to do with it???? Any filtration of quotes is a lag from the quote itself, not from the forecast. For systems that follow the trend it's normal. But they have their disadvantages. Shall I tell you?
 
nikelodeon:
What does the abstractness of my thinking have to do with it???? Any filtration of quotes is a lag from the quote itself, it is certainly not a forecast. For systems that follow the trend it is normal. But they have their disadvantages. Shall I tell you?

The "lag" from the price (numerical series, signal or whatever) has its place, no doubt, but if you cascade a group of filters (overlap), pre-aligning the phase (don't ask what phase is there and how to align it...), you can make perfectly matched to a number of filters, and of course they will overdraw, but the overlap is done for that, as well as phase alignment, so that they will be redrawn in a group "in time" (resonance and other clever terms)))), and not each in its own uncontrolled way, i.e. some conditions on redrawing will overlap.

If you just tune one filter and expect it not to lag, of course, it's crazy.

Only some people see it through a stroboscope and others through a system of filters.

I still can't get myself to describe it in details on the forum.

Already figured out the method, I've twirled it, and you can do it in more than one way, although with filters it's less complicated than going through other methods.

And calculation of indices is considered interesting)))