From theory to practice - page 136

 
Alexander_K2:

Since my beloved daughter and father-in-law are shaking me by the breasts and demand immediate improvement of my TS in order to make a profit, I will write briefly.

So, here is the algorithm I came up with (see attached table for AUDCAD):

1. Receiving quotes in exponential time intervals.

Column A - price Bid

Column B - Ask price

Column C - price (Ask+Bid)/2 - I am working with it, maybe I am mistaken.

Comment: I bring the quote flow to a Markov process with pseudo-states where integral moments of a random variable can be ignored and the equation of motion is reduced to the equation of motion of a quantum particle between two walls. The walls in this case are the boundary values of dispersion of a random variable. 2.

2. Let us analyze the price increments Ask and Bid

Columns D, E, F are increments for Bid, Ask and (Ask+Bid)/2 respectively

I work with pure values of the gradients without transforming them in any way.

3. Calculate statistical parameters for column F (see Sheet 1 in the table). The most important thing is to find a sample volume for sliding window of observations

This is a very important step!!! Based on Chebyshev's inequality we find necessary sample size in which boundary values of dispersion will correspond to confidence level of forecast.

4. Return to the AUDCAD tab of the table and go to the line 15625

Column M - Calculate the length of the particle run in our sliding window of observations = 15625 consecutive quotes.

Columns N and O - Boundary values of the probable deflection of the particle ("wall")

5. Move to Sheet2 of the table

I have copied there columns A, N, M, O beginning from the line 15625 from the AUDCAD tab

6. I build charts:

Top chart - actual price values (Ask+Bid)/2

Lower chart - values from columns B, C and D - we actually see the movement of particles between the walls (in the dynamic channel)

A very important point

I calculated dispersion (columns C and D) in the same way in my model. But I plotted the channel against the SMA moving average for the 15625 sample. Column B was missing.

Was about to switch to WMA, where time was to be used as weights.

The results have been quite satisfactory - out of 6 trades - 4 positive and 2 negative with total profit over 400 pips.

And at this crucial moment Warlock (Vizard_) connected and actually told me with his chart (by hand!!!): Idiot! Why are you working with some moving average? You look at how the particle itself moves (the sum of the increments over the observation time) - it moves relative to zero between the walls!!!

Now I calculate column B and see the following picture:

In the lower graph - motion of the particle in the sliding observation window = 15625 with boundary confidence levels = 99.5%

INGENIOUS SOLUTION!

It is possible and necessary to make forecasts when the price goes beyond these confidence levels

Or you can simply - when a particle leaves the borders of the channel on the lower chart - open a deal. When it comes back to zero - close it, etc. But I'm not going to impose my opinion - everyone is free to make his or her own forecast algorithm.

But to be honest - I'm not sure I would have done it by my own wits - thanks again toVizard.

Now I just need to replace sliding WMA in my TS figuratively speaking with Column B, and someone should comprehend all described above, ask questions if necessary, and build my TS.

Make money on your own! I personally am not sorry and do not need to find ambiguity in my words.

My father-in-law finally got violent and obscene form makes me finally sit down and finish TS.

I bid farewell, but not goodbye. I am always here and kind of absent - well, you get the idea. Schrodinger's cat, in a word. :))))))))))))))))

https://yadi.sk/d/Q26c4qoS3RbJRn
Do you calculate the sampling volume for each point, or once when you run the program?
 
Nikolay Demko:
Do you calculate the sampling volume for each point, or once when you run the program?
Once on the basis of the archive already collected. But, for each pair separately. Sampling volumes are different for various pairs. For EURCAD I generally obtain 50 000 for a reliable forecast = 99.5%. My computer simply cannot function at 20 pairs, while I need 32!
 
Alexander_K2:
Once on the basis of already collected archive. But, for each pair - separately. Sampling volumes are different for different pairs. For EURCAD I generally have about 50.000 for a reliable forecast = 99.5%. My computer is simply panting at 20 pairs, while I need 32!

So you think that the process is stationary and does not change its characteristics over time?

PS If the computer is suffocating it means that the calculations need to be optimised. Surely 99% of calculations repeat the same thing at every sneeze.

 
Nikolay Demko:

So you think that the process is stationary and does not change over time?

The process of price increments (not prices themselves!) is pseudo-stationary. Or almost stationary when analysed by non-parametric methods with huge sample sizes.

Here's Warlock's (Vizard_) answer if you don't trust my words:

The increment(first difference) on tests will be stationary. Things will change slightly, at different sites, as the window shifts.

https://www.mql5.com/ru/forum/221552/page7#comment_6150131

От теории к практике
От теории к практике
  • 2017.12.03
  • www.mql5.com
Добрый вечер, уважаемые трейдеры! Решил было на какое-то время покинуть форум, и сразу как-то скучно стало:)))) А просто читать, увы - неинтересно...
 
Alexander_K2:

The process of price increments (not prices themselves!) is pseudo-stationary. Or almost stationary when analysed by non-parametric methods with huge sample sizes.

Here's Warlock's (Vizard_) answer, if you don't trust my words:

The increment(first difference) on tests will be stationary. Things will change slightly, at different sites, as the window shifts.

https://www.mql5.com/ru/forum/221552/page7#comment_6150131


That's why I asked if you calculate the sample size once, or recalculate it as the process evolves, so that the size is always up to date.

 
Nikolay Demko:

That's why I asked if you calculate the sample size once, or if you recalculate it as the process evolves, so that it is always up to date.

Very nice picture on the history, and it is always for strategies of deviation from the average. Knoros above has even provided a very nice picture for this strategy in the tester.

If you start to trade, the right border will be overdrawn and if you roll through the window, drawing only the last bar, you will not get such a nice picture and it will be completely different. And it is impossible to draw the window, because the size of the window is huge.

 
СанСаныч Фоменко:

A very nice picture on the story, and this is always the case for deviation strategies from the average. Above, Knoros even gave the most beautiful picture for this strategy in the tester.

If you start to trade, the right border will be overdrawn and if you roll through the window, drawing only the last bar, you will not get such a nice picture and it will be completely different. It is impossible to draw the window because its size is too big.


I do not understand why the image has to be redrawn?

It works with ticks, the new tick is a new count, it does not re-draw the same tick twice. So, nothing should be re-drawn.

Or maybe I have misunderstood something?

 
Nikolay Demko:

That's why I asked if you calculate the sample size once, or if you recalculate it as the process evolves, so that the size is always up to date.

That's not what he meant. If you look closely at the graph

If you do this, you will see that in the second graph, the variance changes slightly as the window shifts. This is a manifestation of non-stationarity of the process whose tails we should pick up and profit from.

If, on the other hand, we consider the average parameters of this window when the sample size is gigantic, then they remain virtually unchanged.

 
Alexander_K2:

Since my beloved daughter and father-in-law are shaking me by the breasts and demanding immediate improvement of the TS in order to make the fastest possible profit, I will write briefly.

It turns out that your research is not so humane and unselfish ))

Give it up immediately, or your loved ones will beat the crap out of you.

 
Sergey Chalyshev:

It turns out that your research is not so humane and unselfish ))

Give it up immediately, or your loved ones will beat the living daylights out of you.


Well, all people are different, even if they are relatives - give them money and immediately :))))