Optimal values of SL and TP orders for an arbitrary TS. - page 10

 
M1kha1l >>:

В пору, к сожалению, былой активности предыдущей темы Сергея поисследовал каги-паттерны n-длинной. Получилось несколько интересных "побочных" выводов, например:
- есть "сходящиеся к" и "расходящиеся от" 2Н паттерны со значительной поддержкой и интересностью,

- и самое интересное, имхо, у них большая "привязка" к "внешним" меткам, например времени ( что и понятно, например, для относительно непродолжительных паттерн)

Отсюда можно попробовать сделат связку с соотношением SL и TP

Are you referring to this? I had (and still have) the idea of correlating H+ and H- contexts with the time of day, i.e. trading sessions. But I haven't got round to it yet. Did I understand correctly that your picture has quite a close theme?

As for SL and TP, it seems the use of a senior-senior SL bundle allows to do without artificial SL for H-strategy. Just here's a picture and a little explanation of it (alas, it's all pretty cluttered). So I have limited interest in external hard SL at the moment.

My data also confirms the global dominance of the H- context on the intraday horizons (I sometimes refer to the H+ and H- contexts as breakout and bounce, respectively). Moreover, the 2ZZ scheme mentioned above seems to offer a simple opportunity to visibly amplify this context. Alas, not to a sufficient degree for sustainable trading.

 
Candid писал(а) >>

Are you referring to this? I had (and still have) the idea of correlating H+ and H- contexts with the time of day, i.e. trading sessions. But I haven't got round to it yet. Did I understand correctly that your picture has quite a close theme?

More like the white-green table on the next page. Unfortunately, I don't know how to link to a specific post. How/where do you copy the post address?

Candid wrote >>

As for SL and TP, it looks like using a senior-younger ZZ bundle does away with the artificial SL for the H strategy. Just here's a picture and a little explanation of it (alas, it's all riddled with noise). So I have limited interest in external hard SL at the moment.

Can't comment on that yet - haven't got into the subject

Candid wrote: >>

My data also confirms the global dominance of the H- context on the intraday horizons (I sometimes refer to the H+ and H- contexts as breakout and bounce, respectively). Moreover, the 2ZZ scheme mentioned above seems to offer a simple opportunity to visibly amplify this context. Alas, to an insufficient degree for sustainable trading.

Generally speaking, the difference from 2H indicates only the presence of the so-called trend, which is normal :) for the CD.

But the magnitude of the difference strongly depends on the length of the pattern and the magnitude of H.

Let's, if interested, discuss this in a voice more promptly on Skype or ICQ. I have the same nickname there.

 
M1kha1l >>:

Скорее, белозеленая таблица на след. стр. К сожалению, не знаю как дать ссылку на конкретный пост. Как/где Вы копируете адрес поста?

Yes, I've seen the table, there's a question about the averaging interval of course. Anchor a particular post, I get so: find this post, press "reply", then left-most button "HTML" in the editor. In the first line of the resulting text, I find a piece of text such as href="/en/17609/page86#180631", this is the local address of the post, #180631 is its anchor. For greater reliability, I use not a local address, and the full address, it can be constructed by taking the address of the page from the address bar of your browser and add this anchor to it. The result is https://www.mql5.com/ru/forum/112967/page86#180631. It's a bit cumbersome by the way, does anyone know how to make it simpler?

I can't comment on that yet - I haven't got into the subject

Maybe I brought it up too early, in fact I'm not really sure about it at the moment. But since I said so, I'll add to clarify that the problem of stops for H-strategy is illustrated by Sergei's(Neutron) post about FR size of takedowns of TS that trades by H-strategy.

Generally speaking, the difference from 2H only indicates the presence of the so-called trend, which is normal :) for CD.

But the magnitude of the difference strongly depends on the pattern length and the magnitude of H.

Let's, if interested, discuss this in a voice more promptly on Skype or ICQ. I have the same nickname there.

The idea is that the difference from 2H upwards is a trend ( H+ context), downwards is a flat ( H- context). Although I'm not sure if our terms are the same now.

About discussing by voice - I still prefer offline. The topic is such that you often need to think and give a picture, and it's not bad to have an archive. Maybe private/email/etc. would be better?

 
ystr >>:

Считаю, что здесь упущен один момент: при выставлении TP сделки с h[i] > TP попадут в столбик распределения с h[i] = TP. То есть сделок, где профит будет больше TP будет 0. Точно такие же рассуждения можно, естественно, отнести и к SL - сделок, где лос будет меньше SL будет 0. И, следовательно, распределение кардинально изменяется. Хотя формула все еще остается верной.

This is the case. When TP is set, trades with h[i] > TP fall into the column with h[i] = TP. That is, trades where the profit will be greater than TP there are 0 (look at the blue bar chart in Fig. Exactly the same effect is observed with SL AND, hence, the distribution does not change.

Or I don't understand something...

By the way, one more point: the integral in this formula is erroneously applied because both g[i] and h[i] can only be discrete quantities and therefore this function should not be integrated, only added together. I must say that this topic is interesting and close to me. I hope to continue the discussion.

You, ystr, are certainly right. The problem of limiting transition from discrete quantities to integral calculus is a problem for me. I experimentally found that the error associated with such a transition at discreteness in the argument 1 (integer) is insignificant, and on this I forcibly calm down (buried the problem). I would like to listen to the opinion of people who are familiar with mathematics... I would be grateful to them! Yurixx and Mathemat, can you help? You're the ones who can playfully decompose this kind of stuff. To make the essence of the problem clear at a glance, let me give a simple example. Suppose we want to find the sum of harmonic series consisting of integers from 1 to n. It is known that such a series is divergent and tends to infinity with increasing number of terms. Question: How can we find the sum of the first n members? Following the logic I proposed, we can easily pass from sum to integral by multiplying and dividing the sum by the same number - the discretization step of the argument -1, and taking it, find the sum of the original series. Let's see what we get by doing this. To do this, plot the value of the sum of a harmonic series as a function of the number of terms - n (see figure in red), and then take the resulting integral to the same limits as the original sum (blue).

It can be seen that the graphs coincide to a small constant, it seems to be Euler's constant. In fact, the transition is correct. But is it always? I do not know a strict answer. At any rate, such transition for the FR functional of TC bribes coincides in the first approximation with direct numerical modelling of dependences of the logarithm of TC yield on the value of parameters. But the question is open and I really ask for help of people competent in this area of knowledge.

Avals >>

Neutron

, you can't correctly analyze the influence and effectiveness of SL and TP according to the bribe distribution.

And consequently move on to the distribution of bribes using SL and TP.

SL and TP not only truncate the distribution, taking away their probabilities, but also deform the area between them. How they deform it depends on how the profits/losses change over time from the entry point

.

Take your time, Avals , these details are not that important yet. You see, I want to know at least the most general view of the optimal TP, maybe without details that may not require close consideration in the future.

 
Neutron писал(а) >>

So it is. When TP is set, trades with h[i] > TP fall into the column with h[i] = TP. That is, trades where the profit will be greater than TP there are 0 (look at the blue bar chart in Fig. Exactly the same effect is observed with SL AND, hence, the distribution does not change.

Or I don't understand something...

You, ystr, are certainly right. The problem of marginal transition from discrete quantities to integral calculus is a problem for me. I experimentally found that the error associated with such a transition at discreteness in the argument 1 (integer) is insignificant, and on this I forcibly calm down (buried the problem). I'd like to hear the opinion of people who are familiar with mathematics... I would be grateful to them! Yurixx and Mathemat, can you help? You're the ones who can playfully decompose this kind of stuff. To make the essence of the problem clear at a glance, let me give a simple example. Suppose we want to find the sum of harmonic series consisting of integers from 1 to n. It is known that such a series is divergent and tends to infinity with increasing number of terms. Question: How can we find the sum of the first n members? Following the logic I proposed, we can easily pass from sum to integral by multiplying and dividing the sum by the same number - the discretization step of the argument -1, and taking it, find the sum of the original series. Let's see what we get by doing this. To do this, plot the value of the sum of a harmonic series as a function of the number of terms - n (see figure in red), and then take the resulting integral to the same limits as the original sum (blue).

It can be seen that the graphs coincide to a small constant, it seems to be Euler's constant. In fact, the transition is correct. But is it always? I do not know a strict answer. At any rate, such transition for the FR functional of TC bribes coincides in the first approximation with direct numerical modelling of dependences of the logarithm of TC yield on the value of parameters. But the question is open and I really ask for help from people who are competent in this area of knowledge.

Don't hurry Avals , these details are not so important yet. You see, I want to at least know the most general view of the optimum TP, maybe without details, which in the future may not require close examination.

The graph is a bit confusing with the logarithmic scale for the ordinate axis (g[i]). And as for my remark about the change in the distribution, it refers first of all to the new form of the curve obtained, which is very different from the Gaussian one.

Formally, the integral in this case may occur, but you should understand that the resulting "sum" obtained by means of integration (for integral is the sum of function values) may strongly differ from the actual sum obtained by simple summation. And, naturally, the difference will increase as the value of the function being integrated increases. I recommend considering the differences between usual sums and integrals for functions that have large values (thousands, tens of thousands) in the integration interval. By the way, just for your formula, the values in the integration interval can reach very large values because the ratio K[n]/K[0] for the number of transactions considered on the graph (about two or three thousand) can be very large (from units to millions).

As for searching for the sum of the first terms of a series: to my mind, the finite difference section of mathematics is the best way to do it.

 

to Neutron

Сергей, всё, что ты сейчас пытаешься для себя определить, сводится к требованию конкретизировать условия работы како-то определённой ТС. Пока, в рамках принятого формата изложения материала, нам это не нужно

I can't agree with that yet, but we'll see.

The problem of marginal transition from discrete quantities to integral calculus is a problem for me

Although I'm not a mathematician, but there's no problem there, especially for such assumptions made by you. It was long ago (very long ago), but if my memory doesn't lie, in DSP there is a theorem proving possibility of continuous signal recovery from a discrete signal (after quantization), and the solution seems to be universal, but of course with some assumptions. Try to look around in this direction.


to Yurixx

Yeah, I can't argue with you now - Professor.

We will.

So I take it back.

In order to take back, you have to give something. And words are a tricky thing, they don't always materialise into something you can take away.

That's it!

Everything? Are you offended that I called the context a piece of fairy (C)? I hope not. But it's the context, not your phase space. By the way. it's fundamentally impossible to construct a phase space for a quoting process, even Takens won't help :o) True, the whole world has started to go crazy, and it's no longer clear who puts what meaning and where. And the phase space of TC parameters is a plague! It's a real mess! But I'm not disturbing you, sit quietly - have fun :o)

 
ystr писал(а) >>

By the way, just for your formula the values on the integration interval can reach very high values, because the ratio K[n]/K[0] for the number of deals considered on the graph (about two or three thousand) can be very large (from units to millions).

This is interesting arithmetic. Would you mind showing us at what values of f and the average deal size h (which takes into account loss-making trades) it is possible to increase the deposit 2 million times over 2 thousand trades. I hope you understand that the parameter f < c/K0, where c is the point value, K0 is the minimum depositary for one lot (for EURUSD it is f < 10/1500 = 1/150).

One more point. In reality the distribution g[i] is different from zero only on the finite interval. And in theory, if you don't make up nonsense, it decreases fast enough. Even if you're right and the ratio K[n]/K[0] can reach millions (i.e. ln(S) of order 6), even in this case ln(1+h*f) won't be too different from zero. So what's the problem ? Is it the accuracy of the representation ?

 
Farnsworth писал(а) >>

to Yurixx

All in all? Are you offended that I called a piece of fairy (C)?

No, of course not. There was a smiley face there, I know exactly. Must have got lost on the way.

 
Candid писал(а) >>
I get the anchor of a particular post this way: ...
It's a bit cumbersome, by the way, maybe someone knows how to do it in a simpler way?

Find the word similar at the end of the desired post

Copy the link

Insert it in our response e.g. https://www. mql5.com/ru/forum/123072/page10#similar255957

Remove a word from it and get https://www.mql5.com/ru/forum/123072/page10#255957

 
ystr >>:

На графике немного путает логорифмическая шкала для оси ординат (g[i]). А насчет моего замечания по изменению распределения то оно относится прежде всего к полученой новой форме кривой, сильно отличной от гаусовой.

The new curve shape is exactly the same as its previous one - Gaussian in the area between SL & TP (lugs). Stops have no effect at all on the shape of the distribution of this part of the FS. And beyond the stops, the FR is identical to zero (idealised case. Comments on the correspondence to reality were made just above by Candid).

As I now understand it, there is an inaccuracy in the partitioning of the integration. The point is that I take into account the same boundary bar of the histogram twice when integrating. See how the logarithm of TC's profit was defined (first expression):

And how it should look like, taking into account said overlapping of integration areas (second expression). It is clear that the error is small (1 compared to TP or SL), but let's be as accurate as possible.

I recommend to consider the differences between the usual sums and the integral for functions with large values (thousands, tens of thousands) in the integration interval. By the way, just for your formula, values on the integration interval can reach very high values because the ratio K[n]/K[0] for the number of transactions considered on the diagram (about two or three thousand) can be very large (from units to millions).

As Yura correctly noted above, we are working with the logarithm of relative profit (see expression above) and this value is within a reasonable range up to 10. As for the problem of accuracy in solving the given problem in light of the possible error in the marginal transfer, let me remind you that it is not the relative profit value itself and not its logarithm, but the extremum of the functional defined by it, that is important for us to find. And it just does not depend on the shift along the ordinate axis (the maximum of expression does not shift in this case). I think it is an admissible move.

Let us continue reasoning concerning restoration of general properties of the optimal TS.

First of all, I would like to once again define the meaning I give to the concept of "optimal TS". We will consider it to be a TS, which on average brings the maximum amount of points per unit time. Under the time quantum we will assume (unless otherwise specifically mentioned) readings of price series at opening prices (for clarity). Also, we will call an "ideal TS" a system that, in addition to what has already been mentioned, can look into the future (i.e., it works on historical data and uses the readings located on the right side of the current time interval for analyzing entry/exit points).

Let's try to determine the general type of TFs for the ideal TS. Well at a glance and without much wisdom, we can assume something similar to that shown in the picture on the left:

Indeed, for such TS there is no loss-making transactions (the left border of FR coincides exactly with the value of FC's commission), and positive ones are not limited in size. But let's think, is there really nothing better? After all, the possibility of existence of any arbitrarily large profit involves infinite time of being in an open position, and thus the basic requirement is not satisfied for a TS - to bring the maximum number of points within a unit (finite value) of time. Thus, we must admit the necessity of the forced cutting of the TF to the right, and as a result, its inevitable degeneration into a delta function (a single bar in the histogram shown in Fig. right). Question: Can it (the bar) be located in any place of the definition area of parameter h? It turns out no, not in any place. Its position should not be too far away (not to prolong trades by time) and it should not be too close to the spread, because when it is equal to spread, the profit of TS is nullified. Correspondingly, we can talk about two competing processes (frequency of transactions and the value of the bribe in each transaction) and the defining role of the spread. We need to solve the optimization problem to find the maximum functional for this problem. It is not difficult to build the functional if we remember that position holding time is proportional to the square of the profit. The latter statement is a consequence of similarity of a price series to a random (in this case we consider BP to be a martingale which will not greatly affect the result) one dimensional Brownian motion. For Brownian motion it is known that the average amplitude grows as the square root of time. In other words, if we take twice the previous time interval, we obtain amplitudes that are two times the square root of the price. Taking it into account, we can determine the optimal size of the take H that turns out to be equal to a double spread for the ideal TS. In this case we should not forget that only value equal to Sp will go to profit (we should not forget to pay the commission to brokerage companies).

Here we have such an ideal TS, though not real (fabulous). It will help us in further considerations when constructing the general form of an optimal TS.

Reason: