Discussion of article "Self-adapting algorithm (Part IV): Additional functionality and tests" - page 5

 
Greetings.

1. If we assume that a general pattern has been found that works approximately equally on each of N instruments, then roughly estimate the capacity of the system in terms of increasing simultaneously traded instruments, based on the results for 1 instrument, can be as follows:

O = Z * Tcr * ( 1 + ( N - 1 ) * Corr ) / Tp,
where
Z - number of trades (series of deals) for one instrument,
Tcr - average duration of one trade in days,
N - Number of instruments,
Corr - some correlation coefficient between them [0..1],
Tp - traded period in days.

If O is less than one, it is more likely that the maximum drawdown will not increase with increasing the number of simultaneously traded instruments, and the total profit will tend to increase by N times.
To trade a hundred instruments at once, it will be necessary to ensure the minimum time of being in a deal (which is very difficult for a counter-trend strategy) and the minimum correlation of traded instruments (which is also difficult). Well, or the signal to enter appears so rarely that it is difficult to talk about the system.

2. I sketched out and hastily tested "partial closing" when trading several symbols. Drawdowns have decreased, equity graph is closer to the balance graph. But large drawdowns still appear. Not to the same depth and a bit in the wrong places when compared without "partial close".
In order to make tail cutting (closing of the most unprofitable series or part of them) work regularly and well, it is necessary to constantly feed the balance with successfully closed series, and this inflow should be sufficient to close the minus and leave 20% in the pocket (on the balance). But when there is such a mechanism of profit delivery on "junior" series, there is no sense to get involved in "senior" series.
If we consider locked series on one instrument, when, for example, we hold a minus purchase (1) and close several sales (2), it did not work for me (I mean a stable positive result over a long period). I'm not campaigning for anything, and without maths, exclusively to this: "...I checked...". :)

In general, the system has a pronounced asymmetry. In case of an unfavourable movement, the position builds up. Then the percentage of correct entries should be much higher than the erroneous ones, or a sufficient pullback or significant reserves for drawdown should be expected. On the other hand, it is possible to build up the position on each formed block, both against the entry and towards the profit. Provided that all series are closed at the total planned profit, such a decision gives better results. Also, entering only on "tail" blocks gives a decrease in drawdown.

The system is interesting, it is very variable in different directions. For example, I'm trying the following parameters:
-Blocks:
-- minimum and maximum number of steps to search for trends/flattening (8 - is it a very short section? 50 - do I need so many?),
-- block set size, start and step of elevation change in the set,
-- where to draw the boundary between trend and flat,
And also:
-On opening:
-- whether to use asset hedging control (for a certain set of instruments with acceptable correlation, it is better without control),
-- whether to work on reversal signals (I think it is better to chisel in the original direction or to exit but not to turn around),
-- if a signal, to enter on the block against the move, on the move or in both cases (it varies here)
-- entry volume: fixed lot, or fixed value of the current block, or from fixed value of the maximal size block
-- what to do when losing a signal: close, look for a new one on other parameters, continue on the last one,
-- when closing:
-- plan to exit the series by TP based on expectations of the movement, or by a certain profit in $ relative to the block value (like I want $10 from any series, regardless of drawdowns and build-up)
-- whether to use the total profit for all open series and in what volume relative to the block value (30 in total from all series, and close?)
-- whether to use a partial closing mechanism.

It is clear that the author has not voiced these questions, and maybe it is all unnecessary. It's clear that I'm twisting and turning the system to the extent that I understand it and the quality of its implementation. But I like the system itself and the process of its study, thanks to the author, I follow with interest.
All questions-parameters require multiple testing, which is very difficult in the original version of block building (large amount of calculations). I tried to simplify calculations and construction of block sets (using rare fixed reference dates for calculation, instead of calculations from the last bar). The speed of calculation is almost cosmos, but, unfortunately, I noticed a deterioration in the quality of the received signals :( Now I am wrinkling my brain how to combine...

I also found out that volumetric control works better than binary control when controlling hedges by assets. Binary - when we control only the direction of open positions by currency, without taking into account the volume. Volumetric - I calculate the analogue of the "Assets" tab and open new positions from zero or against the accumulated amount. (By the way, is there a standard means of getting data from this tab in MQL5?)

Somehow, in general.

P.S. When the system is designed to make decisions on formed bars (only on opening), does not have SLs and TPs marked in positions (although they may be present in the algorithm), "OHLC M1" already contains sufficient redundancy for reliable testing.
 
Amba404:
Greetings.

1. If we assume that a general pattern has been found that works approximately equally on each of N instruments, then roughly estimate the capacity of the system in terms of increasing simultaneously traded instruments, based on the results for 1 instrument, can be as follows:

O = Z * Tcr * ( 1 + ( N - 1 ) * Corr ) / Tp,
where
Z - number of trades (series of deals) for one instrument,
Tcr - average duration of one trade in days,
N - Number of instruments,
Corr - some correlation coefficient between them [0..1],
Tp - traded period in days.

If O is less than one, it is more likely that the maximum drawdown will not increase with increasing the number of simultaneously traded instruments, and the total profit will tend to increase by N times.
To trade a hundred instruments at once, it will be necessary to ensure the minimum time of being in a deal (which is very difficult for a counter-trend strategy) and the minimum correlation of traded instruments (which is also difficult). Well, or the signal to enter appears so rarely that it is difficult to talk about the system.

2. I sketched out and hastily tested "partial closing" when trading several symbols. Drawdowns have decreased, equity graph is closer to the balance graph. But large drawdowns still appear. Not to the same depth and a bit in the wrong places when compared without "partial close".
In order to make tail cutting (closing of the most unprofitable series or part of them) work regularly and well, it is necessary to constantly feed the balance with successfully closed series, and this inflow should be sufficient to close the minus and leave 20% in the pocket (on the balance). But when there is such a mechanism of profit delivery on "junior" series, there is no sense to get involved in "senior" series.
If we consider locked series on one instrument, when, for example, we hold a minus purchase (1) and close several sales (2), it did not work for me (I mean a stable positive result over a long period). I'm not campaigning for anything, and without maths, exclusively to this: "...I checked...". :)

In general, the system has a pronounced asymmetry. In case of an unfavourable movement, the position builds up. Then the percentage of correct entries should be much higher than the erroneous ones, or a sufficient pullback or significant reserves for drawdown should be expected. On the other hand, it is possible to build up the position on each formed block, both against the entry and towards the profit. Provided that all series are closed at the total planned profit, such a decision gives better results. Also, entering only on "tail" blocks gives a decrease in drawdown.

The system is interesting, it is very variable in different directions. For example, I'm trying the following parameters:
-Blocks:
-- minimum and maximum number of steps to search for trends/flattening (8 - is it a very short section? 50 - do I need so many?),
-- block set size, start and step of elevation change in the set,
-- where to draw the boundary between trend and flat,
And also:
-On opening:
-- whether to use asset hedging control (for a certain set of instruments with acceptable correlation, it is better without control),
-- whether to work on reversal signals (I think it is better to chisel in the original direction or to exit but not to turn around),
-- if a signal, to enter on the block against the move, on the move or in both cases (it varies here)
-- entry volume: fixed lot, or fixed value of the current block, or from fixed value of the maximal size block
-- what to do when losing a signal: close, look for a new one on other parameters, continue on the last one,
-- when closing:
-- plan to exit from the series by TP based on static expectations of the movement, or by a certain profit in $ relative to the block value (like I want $10 from any series, regardless of drawdowns and build-up)
-- whether to use the total profit for all open series and in what volume relative to the block value (30 in total from all series, and close?)
-- whether to use a partial closing mechanism.

It is clear that the author has not voiced these questions, and maybe it is all unnecessary. It's clear that I'm twisting and turning the system to the extent that I understand it and the quality of its implementation. But I like the system itself and the process of its study, thanks to the author, I follow with interest.
All questions-parameters require multiple testing, which is very difficult in the original version of block building (large amount of calculations). I tried to simplify calculations and construction of block sets (using rare fixed reference dates for calculation, instead of calculations from the last bar). The speed of calculation is almost cosmos, but, unfortunately, I noticed a deterioration in the quality of the received signals :( Now I am wrinkling my brain how to combine...

I also found out that volumetric control works better than binary control when controlling hedges by assets. Binary - when we control only the direction of open positions by currency, without taking into account the volume. Volumetric - I calculate the analogue of the "Assets" tab and open new positions from zero or against the accumulated amount. (By the way, is there a standard means of getting data from this tab in MQL5?)

Somehow, in general.

P.S. When the system is designed to make decisions on formed bars (only on opening), does not have SLs and TPs marked in positions (although they may be present in the algorithm), "OHLC M1" already contains sufficient redundancy for reliable testing.

Interesting. I agree with the formula for estimating drawdown, in general the logic is correct.

As for the inflow of closed series, the logic is also correct, new series should be closed as often as possible. Here we need to improve the quality of the algorithm itself, so that it enters unprofitable series as rarely as possible. To do this, you need to refine the scaling algorithms. I refined it in the new version and it has already started to work much better. The idea is that you need a theoretical pricing base that describes what and how the market works. The better the theoretical model, the lower the drawdowns and the lower the correlation between instruments.

Locked positions make sense, it works worse without them than with them (in my algorithm). But only on those instruments for which growth and decline are symmetrical. For asymmetric instruments, you need to use asymmetric parameters to generate a signal for long and short positions. That's why only long positions are allowed on shares for the time being, so additional series cannot be locked. Locking is a conditional mechanics, which is necessary for visualisation and to make it easier to think. In reality, when trading on netting, of course there are no locks.

Ideally, this algorithm and locks are not needed, it is necessary to calculate the points of highest probability of price reversal based on market data. But this is how it is done so far. When the theoretical base will reach the necessary level, the algorithm will be simplified.

According to my observations, it makes sense to build up a position only against the price movement. If the position is Buy, then buy only on each falling block. This approach itself pulls the expectation into a plus, without everything because of some theoretical peculiarities of price movement. it is especially expressed on shares. That is, the sense is inherent in trading against the trend in the direction of the main trend. It is always more profitable to buy an asset on its fall and sell on its growth.

Theses:

- The minimum and maximum number of steps does not depend on the characteristics of the market, but depends only on the parameters of the algorithm. The smaller the step size, the lower the accuracy, the larger the step size, the higher the accuracy, but more positions will be opened. Blocks are a convention created for better visualisation. You can rework the system so that you can analyse a window of 100 blocks, but the trading results will be similar to a window of 24 blocks. I just did it this way.

- The block size is chosen to be the minimum, on which profit is possible, taking into account commissions and block closing errors (because candlesticks are used for analysis). One important feature is not described here. As the block size decreases, the overweight percentage should increase, just because of this trend error, which occurs because the candlestick closing price does not coincide with the block closing price. I have not done this yet, but I plan to do it in the future. This will significantly improve the quality of signals. But the block size itself should be chosen based on the market parameters. It should change depending on the past statistic of the market. There is one peculiarity that can help to correct the scale before the start of the series.

- There is no boundary between trend and flat, it is a convention, based on the fact that on average the market probability of changing the direction of each next step is about 50%. But there are instruments that have less than 50%, i.e. they are trending. Local deviations are used and in the future it will return to its average. Because if this is not the case, you can immediately make money with simpler algorithms.

- I use asset hedge control at the open.

- the reversal signal is not worked out, after closing everything starts again, but it is not so simple here too. You need to work it out, but the theoretical basis is not ready for it yet.

- enter only against the move

- Entry volume is an important issue. It should be corrected. I have developed several correction methods. Separately for shares and for currency, the mechanism is not simple. On stocks, you need to adjust the volume of the portfolio, and on currencies too. The block price should be approximately the same for all instruments. You should trade not in lots, but in dollars and adjust lots from the volume of the deal in dollars. Trading on the fix number of $ (on shares) itself increases the expectation. On currencies I have not yet developed a theoretical model. Does the volume depend on the scale size? I plan to implement and test this in the new version, but so far the process has not reached this point.

- When a signal is lost, I start over.

- The exit from the series is planned on the basis of stat movements and theoretical closing point. If we miss the closing point due to unaccounted factors, the mechanisms of compensation of losing positions work. The better the theoretical model is, the less often we will miss. The $10 fix takes the system back to expectation 0 due to randomisation.

- I think we can use the total profit, but it should also be dynamic. That is, it should be closed only if there was a significant deviation of the total profit from random wandering (a sharp price spike). It makes logical sense.

- I was planning to try the partial closing mechanism. But I don't know how it will work yet. I wanted to use it when approaching the theoretical closing point. Not a hard profit, but gradual closing of positions in the range of +- 10% from the closing point. This is a conditional percentage. It will have to be calculated on the basis of something, but I haven't dealt with this issue closely yet.


It's an interesting solution regarding volumetric hedge control, I didn't think of it myself).

The system was designed to work on m1 ohlc, later I will show how it differs in the ohlc mode and in the mode of real ticks. I made it specially to be insensitive to the quality of history and breaks with the server during trading.

 
Petros Shatakhtsyan:

Here you are showing a lot of graphs, over several years.

If you want your TS to be evaluated, show at least the results of the test NOT on ticks (Every Tick), but on real ticks ( Every tick based on real ticks), at least for this year, for 3-4 pairs.

Is it also difficult ?

Here are 2 tests as promised. The first one in OHLC 2020-2021 GBPUSD m1 mode

and the second test on the same period and instrument, but in real ticks mode from a real account.

We can see that the profit by ticks is a bit higher, the drawdown is a bit lower, the trades are about the same, the chart of profitability is almost the same.

It is understandable, technically the robot is made to work according to OHLC, and in the ticks mode it works a little better because of greater accuracy. But these are purely technical aspects. I will not test it for a longer period and on a larger number of instruments, there is no point, and it takes an hour and a half to run 1 instrument.

 
Maxim Romanov:

and it takes an hour and a half to run one instrument.

Why is it so slow? I'm sure you can speed it up without losing functionality.

 
Andrey Khatimlianskii:

Why is it so slow? I'm sure you can speed it up without losing functionality.

I also think that it is possible to speed up, but I haven't done it yet, I'm still having problems with finishing the main functionality..... I will implement all the developed modifications, bring it to an adequate risk/profit ratio and then I will start optimising resource consumption. There is a little bit left in the algorithmic plan, and a lot left in terms of work.

 
Maxim Romanov:

I also think that it is possible to speed up, but I haven't done it yet, I have problems with finishing the basic functionality..... I will implement all the modifications I have developed, bring it to an adequate risk/profit ratio and then I will start optimising resource consumption. There is a little bit left in the algorithmic plan, and a lot left in terms of work.

Wouldn't the development speed up if the Expert Advisor could be tested quickly? It's up to the owner.

 
Maxim Romanov:

Here are 2 tests as promised. The first one in OHLC 2020-2021 GBPUSD m1 mode

and the second test on the same period and instrument, but in real ticks mode from a real account.

It can be seen that the profit by ticks is a little higher, drawdown is a little lower, trades are about the same, the profitability graph is almost the same.

It is understandable, technically the robot is made to work according to OHLC, and in the ticks mode it works a little better because of greater accuracy. But these are purely technical aspects. I will not test it for a longer period and on a larger number of instruments, there is no point, and it takes an hour and a half to run 1 instrument.

Thank you.

If both charts are similar, then if you filter the ticks within 1 minute, it will be the same.

You declare that your algorithm works equally on all currency pairs, but you never saw a test on all symbols from the Market Watch.

And Self-adaptive algorithm should not have any fixed parameters, such as time intervals, fixed levels or number of pips, to open/close orders.

 
Andrey Khatimlianskii:

Wouldn't development speed up if the EA could be tested quickly? It's up to the owner.

Development would definitely go faster if there was a specialist who does it quickly, and not half of the functionality in a year and then with problems.

 
Maxim Romanov:

Development would definitely go faster if there was a specialist who does it quickly, not half of the functionality in a year and then with problems.

It is not a problem to speed up the algorithm. Those who were engaged in optimisation tasks will do it quickly.

The point is different. There are some fixed values in your drawings. I've marked them.

Wheredid you get these figures from? If fixed values are used in trading, then you have to change them all the time.



 
Petros Shatakhtsyan:

Speeding up the algorithm is not a problem. Those who have been engaged in optimisation tasks will do it quickly.

It's a different matter. There are some fixed values in your drawings. I've marked them.

How do you get these figures? If you use fixed values in trading, you have to change them all the time.



These are fixed values for example. In the algorithm almost everything that concerns the market is corrected by itself. There are fixed values, like the number of blocks to analyse, I use the range of 24-32 blocks. But these values are not related to the market, they are parameters of the algorithm itself, in fact it is the accuracy with which it works. That's about it. Now the percentage of overweight is fixed, but it will be modernised, and it is not a critical parameter, I know what it depends on, I can set it by hand. In general, there is something to improve to bring the quality of trade to an acceptable level.