Difference calculus, examples. - page 18

 
Aleksey Panfilov:

The red wide is a sliding line constructed by interpolation with a fourth-degree parabola. It is not redrawn (the analogues were explained at the beginning of the page to the seventh). If I understood correctly, the nodes are the four previously drawn values and the new price by which the parabola of degree 4 is selected and the fifth new value is drawn on it.

The curve blue line (not redrawn can be considered a trace of the straight blue line) is the center line, each point of which is plotted on the last three points on a wide slip from the assumption that they lie on the sine wave of a certain period, just as each pointof the straight blue line is plotted on three points on the already correctly extrapolated sine wave (gray).

Only the extrapolated grey sine and the straight blue line are redrawn.


P/S.

If you implemented your idea to isolate the oscillations, you should have gotten a line very close to a sinusoid with variable amplitude and reversal (a kind of quantization).

Just for such a line it is relevant to investigate extrapolation by a sinusoid.

The wide red one is a weird interpolator... shitty to say the least. Clearly heavily skewed to the right (which interpolators of __history__ are forbidden by definition), although there is plenty of data.

And by improper interpolation, the **extra**polation based on it is a spherical horse making noises :-)

---

Let me explain - there is historical data. You (I do not know on what basis), decide that they can be interpolated by a power polynomial in places (!!). As a result of interpolation on a given interval you must obtain a line which satisfies some criterion,
usually the standard deviation. It should lie on the __historical_ data as native, visually keeping up with them. Except for a certain window of the most current data.

---

although the approach itself is classic :-) we have some data, on the basis of a shaky theory we assume that we are entitled to describe by a polynomial, we interpolate, check, and extrapolate by the roots of the polynomial...

 
Maxim Kuznetsov:

the wide red one is a strange interpolator... shitty to say the least. Clearly heavily skewed to the right (which interpolators __history_ forbids by definition), although there's plenty of data.

And by improper interpolation, the **extra**polation based on it is a spherical horse making noises :-)

---

Let me explain - there is historical data. You (I don't know on what basis) decide that you can interpolate them with a power polynomial in some places(!!!). As a result of interpolation on a given interval you must obtain a line which satisfies some criterion,
usually the standard deviation. It should lie on the __historical_ data as native, visually keeping up with them. Except for a certain window of the most current data.

---

although the approach itself is classic :-) have some data, on the basis of a shaky theory assume that we are entitled to describe by a polynomial, interpolate, check, and by the roots of the polynomial make extrapolation...


2018.01.12:23RU

Forum on trading, automated trading systems and trading strategy testing

Difference calculus, examples.

Nikolai Semko, 2018.01.12 00:43


I am simply advocating that things should be called by their proper names and generally accepted terminology should be used, so that there is no confusion. In my opinion, it would have been more logical to mention recursion at the beginning of this thread, and not to mention interpolation, approximation and polynomials, as they are not shown in your example. And it would have been more correct to focus on the shift of the indicator to the left that will not mislead others by excessive correctness of forms since not everyone likes to look into other people's code; I had fell for it too.


Nikolai, thanks for the post and the attached indicator.

And I completely agree, first of all there is a need for unambiguous understanding of terms and names.

Let me explain my position.

You can draw a line by two points which means that you can find any point of this line either inside the interval between the points (interpolation) or outside the interval between the points (extrapolation).

You can draw a single-valued curve corresponding, for instance, to a square parabolaexpressed in a Cartesian coordinate system by a linear quadratic equation. This means that it is also possible to find any point of this curve either within the interval between extreme points (interpolation) or outside this interval (extrapolation). The law according to which these points are plotted remains polynomial. I should also add that, at least by three points, it is possible to draw a unambiguous sine-wave, if we assume a sine-wave law, or a circle, if we assume its presence.

Thus the interpolation by a polynomial of the second degree over three points(in our case,two of which accumulate the previous history and the third carries new information) of the fourth, turns out to be a necessary(there may be other laws) and sufficient definition of the action or process.

Unless, of course, you suggest other terms for it.

That said, I fully agree that if a curve is to be plotted over a number of values exceeding the minimum required number, then statistically (or otherwise) sound methods of weighting the values, including regression, should be used.
 
Aleksey Panfilov:

It's been more than a year and you, Alexey, are still stubbornly shifting the graph to the left. Why this (self) deception?

Look at the visualisation, maybe someone will come up with some ideas.

I haven't seen anything to latch on to for use in real trading, no matter how hard I've tried.

Have you tried to write robots using it?

 
Nikolai Semko:

It's been more than a year and you, Alexey, are still stubbornly shifting the graph to the left. Why this (self) deception?

Look at the visualisation, maybe someone will come up with some ideas.

I haven't seen anything to latch on to for use in real trading, no matter how hard I tried.

Have you ever tried to develop robots using it?

My pleasure Nikolay.

I have posted tester robots in this thread. I posted the last one not so long ago.I have also tested theBanzai.mq4 indicator.

I have not tested it specifically on this indicator. You can test the last robot, the indicator and the scheme are similar.

Well, the shift. :))

It corresponds to the drawing scheme.

The blue line is the EMA of the first degree with the leverage of 20 on the opening points. It fully corresponds to the classical EMA with the period of 41, by the opening point. shifted by 20 intervals back.

The thin line shows the construction scheme. In fact, it is the Archimedean lever from the previous calculated point.

By analogy, the blue line is the EMA of the second degree, because it is connected to the open point with the parabola of the second degree.

The red line is connected to the opening point with the polynomial of the third degree.

And so on. )))


P/S.

Special thanks for the attached animation.

 
Nikolai Semko:


Reading yourCanvas threadis awesome!

The possibilities you are uncovering are amazing.

Also,Sergey Pavlov once explored the possibilities of using straight rays.

This is one of his old screenshots.

And the current thread deals with algorithms for constructing not only straight rays but also parabolic and sinusoidal ones.

Maybe from the synthesis of all this. something will come out? :))

 

Essentially the same thing, only much simpler through indicator recursion:

https://www.mql5.com/ru/code/25113

If we take the MA with a minimum period of 2 N times from itself, we get the weights of the bars as a Pascal triangle, which I think was mentioned somewhere in this thread.


MaFromMa
MaFromMa
  • www.mql5.com
Данный индикатор создан для демонстрации индикаторной рекурсии, когда индикатор рассчитывается из самого себя любое количество раз. В этом варианте рассчитывается Moving Avarage с периодом Per2 от другого  Moving Avarage с периодом Per1 любое количество повторений N.
 
Nikolai Semko:

It's essentially the same thing, only much simpler through indicator recursion:

https://www.mql5.com/ru/code/25113

it's done very nicely

but

in this indicator, as I understand it, the logical idea is to make a prediction in the previous time into the present from the ex post facto.

then how do you make it from present to future?

 
Renat Akhtyamov:

It's very nicely done.

but

in this indictor, as I understand it, the logical idea is to make a prediction in the previous time into the present from the ex post facto.

then how do you make it from present to future?

has been written here many times before, including by me. Polynomial regression to help for a redrawn tail. Fourier approximation is also possible. Which is what Alexey Panfilov has implemented here.

He also wrote that all these are useless toys because of redrawing the tail.

 
Nikolai Semko:

has been written here many times before, including by me. Polynomial regression to help for a redrawn tail. You can also approximate it by Fourier method. Which is what Alexey Panfilov has implemented here.

He also wrote that all these are useless toys because of redrawing the tail.

and the best solution is a channel?
 
Renat Akhtyamov:
and the best solution is a channel?

finding linear and parabolic channels throughout the story and controlling them. There are only a few of them - between 5 and 15 as a rule.