From theory to practice - page 77

 
Roman Shiredchenko:
:-) There is no need to take it off. The main thing is to have time to make and sell by the New Year. After all, there will be no market after New Year.
If it does not get out of the way, it will run away for at least a year.
 
Alexander_K2:

It's hard for me, of course, to program and process data and communicate on the forum. But I will manage - it's a matter of principle.

I do everything myself because I seriously thought that mostly young people are here and I wanted to show that a person could do everything on his own if he wanted to.

OK

Here youth call the newcomers, well as you for example.

But... there are all kinds of people, not just beginners

 
Alexander_K2:

... For example, I can't find it - OrdersTotal() gives the number of open positions for ALL pairs, but how do I know how many positions are open for a particular pair, something like OrdersEURUSD() :))))) ...


Here is a function which will return the number of open positions for a given currency pair sy:

//+------------------------------------------------------------------+
//| Calculate Market Orders function 		                     |
//+------------------------------------------------------------------+
int TotalOrders(string sy) {	// sy - Currency Pair

int orders=0;

   for (int i=0; i<OrdersTotal(); i++) {
     if (OrderSelect(i, SELECT_BY_POS, MODE_TRADES)) {
       if (OrderMagicNumber()==MN) {
         if (OrderSymbol()==sy) {
           if (OrderType()==OP_SELL || OrderType()==OP_BUY) {
             orders++;
           }
         }
       }
     }
   }
   
return(orders);
Совершение сделок - Торговые операции - Справка по MetaTrader 5
Совершение сделок - Торговые операции - Справка по MetaTrader 5
  • www.metatrader5.com
Торговая деятельность в платформе связана с формированием и отсылкой рыночных и отложенных ордеров для исполнения брокером, а также с управлением текущими позициями путем их модификации или закрытия. Платформа позволяет удобно просматривать торговую историю на счете, настраивать оповещения о событиях на рынке и многое другое. Открытие позиций...
 
Alexander_K2:

This is what the programme for 16 pairs looks like in Wissima.


Here is what you see in the blocks ..._Write is the writing of commands to the .csv file: 1 - open trade, 0 - close.

In MQL, I just read it. Just like a hammer. Funny, isn't it?

"(It's funny for you and even for me)
 
Alexander_K2:

This is what the programme for 16 pairs looks like in Wissima.


Here is what you see in the blocks ..._Write is the writing of commands to the .csv file: 1 - open trade, 0 - close.

In MQL, I just read it. Just like a hammer. Funny, isn't it?

I'll tell you a terrible secret - a couple of years ago I did exactly that).
 
Yuriy Asaulenko:

Never mind. I didn't publish the results, just the conclusion. I didn't even bother to save the calculations, because I was interested in the presence or absence of it. To this day I do not know what it may be used for. Something did not see, what is your conclusion?

As for the experiment itself, they are almost equivalent. Only instead of MA I used LF filters, and instead of a "frequency" distribution (as far as I understood you applied it) I used a probability distribution. I reduced them together by converting the cutoff frequencies of the filters to unity, with a corresponding change in the amplitude by signal energy.

Alternatively, the same could be shown via the Fourier transform and comparison of spectra via scaling. I did not do that.

The conclusions I came to are probably worth citing.

1. The square root law(https://www.mql5.com/ru/forum/193378/page16#comment_5116118, formula (1))
has a very high degree of generality, clearly not related to any particular model.

2. From Fig. 4 https://www.mql5.com/ru/forum/221552/page75#comment_6203173 we can see that in the area of overlapping curves
frequency dependences on d/Ti^0.4 these dependences follow a straight line. By eye, according to the number of rectangles of the figure grid,
the tangent of its slope is about -4. This is confirmed by the numbers in the table. So log(n) is proportional to
log (d/Ti^0.4) to the power minus 4. In other words, the frequency n is proportional to (d/Ti^0.4)^(-4). The average period dt is respectively
is proportional to (d/Ti^0.4)^4. For each particular period of the moving average Ti, the period of oscillation dt of the course relative to it is proportional to
d^4. Not d^2, as would follow from the application of EQC without analysis.

3*. I can explain my version of the reason for this difference only with the amateurish involvement of the apparatus of characteristic
of probability distributions. These are complex-valued functions over the complex plane, and there. As they say,
one becomes a mathematician when one understands the behaviour of the multivalued logarithm around zero. From this point of view
I am not a mathematician, so the further explanation is not yet well founded, it is a guess. In general, a Taylor series expansion of f
gives coefficients of dependence on degrees of time, equal to statistical moments. For a random process of quotes
the first momentum, expectation, is zero. The second one is dispersion, or the square of deviation. If we limit ourselves to this segment
of Taylor series, then the square of the deviation is proportional to the time, and the deviation itself is a root of it (ZKC). This is true for
distributions with zero expectation. Even if they are different. This is how I see the "roots" of the square root law now.
In this case (Fig. 4), the "slow average" itself tracks fluctuations of the order of its variance, it follows
course. And the second point also becomes zero. Since I have added up the frequencies with different signs of the same
the third momentum, like the first and second, is zero. That leaves the fourth. The fourth degree of deviation
to the fourth degree of deviation, as the five graphs in fig. 4 show. This is for deviations of fast averages from slow averages.

4. I think it is possible to reduce the plots of Fig.4 to one overall plot by splicing the asymptotes corresponding to the dominance of the 4th and 2nd moments,

along a boundary, which would also be determined by the square root law. If necessary. The tails of the graphs can be smoothed by

grid of values of deviations in this area to be made more sparse. Again, if necessary.

P.S. * We should see if what is said can be more accurately related to the derivative functions rather than to the characteristic functions.

и снова случайное блуждание...
и снова случайное блуждание...
  • 2017.05.28
  • www.mql5.com
вот файл....это генератор случайных графиков....причем они совершенно неотличимы от настоящих...
 
Alexander_K2:

This is what the programme for 16 pairs looks like in Wissima.


Here is what you see in the blocks ..._Write is the writing of commands to the .csv file: 1 - open trade, 0 - close.

In MQL, I just read it. Just like a hammer. Funny, isn't it?

Too bad you never read what Equity is. I don't think you've read what Equity is either.

Let me tell you a true story about the number of currency pairs on this occasion. Once in my life I was at the Moscow Musical Comedy Theatre, 'Pygmalion' was being performed, and the father of the main character, a drunkard, first talked about how difficult life was, then recalled the mutual help of his neighbours, then that he was also a neighbour and people could come to him asking for a loan, ending his aria like that:

If I'm lucky, if I'm lucky, when the neighbour comes, I won't be home. If you're lucky, if you're lucky, if you're lucky, if you're lucky..."

It was a benefit for Larisa Golubkina.

You're not going to a benefit, you're going to make your debut. You aim to work with as many couples as possible. 36. If you count each of them as a neighbour, are you prepared for them to come for money at the same time? Do you realize that every trade you open and do not yet close requires a deposit from your account? Are you going to trade each pair with 1/36 of your available funds? Then the profit will also be 36 times less...

Or are you sure that you will be "lucky", and for each pair, the deal will already be closed, when you need to open on another pair?

Take advice from your daughter, they usually know debuts better than fathers. It's still too early for them in the beneficiaries.

 
Vladimir:

The conclusions I came to are probably worth citing.

1. The square root law(https://www.mql5.com/ru/forum/193378/page16#comment_5116118, formula (1))
has a very high degree of generality, clearly not related to any particular model.

2. From Fig. 4 https://www.mql5.com/ru/forum/221552/page75#comment_6203173 we can see that in the area of overlapping curves
frequency dependences on d/Ti^0.4 these dependences follow a straight line. By eye, according to the number of rectangles of the figure grid,
the tangent of its slope is about -4. This is confirmed by the numbers in the table. So log(n) is proportional to
log (d/Ti^0.4) to the power minus 4. In other words, the frequency n is proportional to (d/Ti^0.4)^(-4). The average period dt is respectively
is proportional to (d/Ti^0.4)^4. For each particular period of the moving average Ti, the period of oscillation dt of the course relative to it is proportional to
d^4. Not d^2, as would follow from applying ZKK without analysis.

3*. I can explain my version of the reason for this difference only with the amateurish involvement of the apparatus of characteristic
of probability distributions. These are complex-valued functions over the complex plane, and there. As they say,
one becomes a mathematician when one understands the behaviour of the multivalued logarithm around zero. From this point of view
I am not a mathematician, so the further explanation is not yet well founded, it is a guess. In general, a Taylor series expansion of f
gives coefficients of dependence on degrees of time, equal to statistical moments. For a random process of quotes
first momentum, expectation, is zero. The second one is dispersion, or the squared deviation. If we limit ourselves to this segment
of Taylor series, then the square of the deviation is proportional to the time, and the deviation itself is a root of it (ZKC). This is true for
distributions with zero expectation. Even if they are different. This is how I see the "roots" of the square root law now.
In this case (Fig. 4), the "slow average" itself tracks fluctuations of the order of its variance, it follows
course. And the second point also becomes zero. Since I have added up the frequencies with different signs of the same
the third momentum, like the first and second, is zero. That leaves the fourth. The fourth degree of deviation
to the fourth degree of deviation, as the five graphs in fig. 4 show. This is for deviations of fast averages from slow averages.

4. I think it is possible to reduce the graphs of Fig. 4 to a single general one by splicing the asymptotes corresponding to the prevalence of the 4th and 2nd moments,

along a boundary, which would also be determined by the square root law. If necessary. The tails of the graphs can be smoothed by

grid of values of deviations in this area to be made more sparse. Again, if necessary.

P.S. * We should see if what is said can be more accurately related to the derivative functions rather than to the characteristic functions.

I always repeat my studies on the SB plot. if the SB plot shows the same result, I conclude that such a study is of no practical use.
 
Максим Дмитриев:
Maybe it has something to do with the properties of the wand. I always repeat my research on the SB graph. if the SB graph shows the same result, I come to the conclusion that there is no practical use for such research.

For whom. I started digging a little deeper here because the ratio of degrees turned out to be the same as in a completely different problem. Which is, in fact, what I'm interested in at the moment.

Oh, by the way, I don't know what a "random walk graph" is. Can you tell me?

 
Vladimir:

For whom. I started digging a little deeper here because the ratio of degrees turned out to be the same as in a completely different problem. Which is, in fact, what I'm interested in now.

Oh, by the way, I don't know what a "random walk graph" is. Can you tell me?


Well, the simplest case is a coin flip.

Reason: