Developing a stable trading robot

 

I am in the process of developing a stable trading system that will combine stable profits with occasional losing trades. The system is based on a flip martingale. I should immediately mention that I understand the futility of the classical martingale, but in this system it is used in a slightly different form, namely to reduce the number of losing trades to a minimum. At this point I have had some success with it, but now I need new ideas and approaches. In fact, I propose to finalize the system along several lines, as a result, everyone who has taken part in the development and has contributed very constructive and effective methods will get a profitable robot.

I will now describe what has been done.

It was decided to limit the number of turns to 5. If we make a loss on the fifth turn, we simply fix it.

We built a simple robot that works according to the following principle: we set a channel width (let's take 30 points), place a buy order, if the price goes against us, after 30 points this position will be closed and opens in the opposite direction with a double lot (lot multiplier is changed in the settings). It turns out a lump-sum profit (if you enter with the first lot 0.1) = 30$, at the same time, the lump-sum loss = 870$.

To reduce non-recurrent loss, every even S/l divided by 2. It turns out:

(-0,1*30)-(0,2*15)-(0,4*30)-(0,8*15)-(1,6*30)=-780$ Убытка. So the one-off loss has been reduced by 11%.

Here is a graphical principle of operation:

Here are the results of testing this principle for the first month we got without optimisation with a limit of 5 flips. January 2012

The loss, as we see, is $634. The result is far from ideal, but this version was built for a starting point.

What was done next....

In order to reduce the number of flips it is necessary to adjust the swing range (spread between buy and sell). This was done as follows: Over the last 24 hours we determine the average amplitude of fluctuations of the currency pair. To do it this way: we look for all fluctuation amplitudes present in the market (it's a long story how they are calculated), then we take the average value, which is now the spread (the value that was 30 points in the beginning). We determine the trend and the strength of the trend for the same period. On the basis of the trend strength, we determine how much to divide the initial spread (to get a stop loss of even positions). This stop loss varies from equal to the first one, to a smaller one. If the market is in a flat, the stop loss of even positions = 1/2 of the rest, if there is a trend, its value is close to 1, depending on the strength.

Thus, if there is a flat, the system becomes directed (as in the figure), if there is a trend, it turns into an ordinary one.

Here's what it did in the same month as the first test:

Got only 2 drains, with a loss of only $102. Initial lot 0.01, maximum 0.16.

As we see the result on the face.

What are the disadvantages of this system? Often reversals are accumulated due to sharp market fluctuations, they could have been avoided. That's why the filtering method was invented.

The essence of this method is to determine the period of interfering fluctuations and on the basis of this the period of the filter which filters these fluctuations is adjusted. Now stop losses are closed not when the price reaches it but when the stop loss filter is reached. It looks as follows:

The figure shows trades without filter + filter, and you can see how the filter does not reach the stop loss, allowing you to avoid unnecessary flips.

What have we managed to achieve? We have managed to decrease the number of losing positions, and now we may see 0 to 2 losing series per month on average (on minutes). If we analyze 15-minute positions for 2011, we have only 3 drawdowns per year. Why 15 minutes is better? Because the average amplitude of fluctuations is better preserved on them.

Here is the result:

As we see the same month as those 2 drawings, we get 51$ profit, at that maximal loss is 0,18, at start with 0.01, and the same 5 flips.

It would seem a good result, but in some months of plum still have, and ohin at this lot, as I wrote = $ 78, which is commensurate with the profits, then in general, the system is still plum. Once again I want to say that this is without optimization (although there is nothing to optimize, all parameters are calculated themselves).

Hence further work comes down to 3 things:

1) Increase of profit for each position, i.e. closing not by Take Profit, but by some condition (maybe someone has some experience in following the end of a trend). At present positions are sometimes closed below the trend. If someone proposes to close on an indicator, we must come up with an algorithm of recalculation of the period of this indicator according to the market situation.

2) Increase the maximum, one-time profit. Using some working algorithm, you need to make the maximum one-time loss to be larger or equal to, or slightly smaller than the one-time loss.

3) Reducing the lump-sum loss. I have now come up with an algorithm of partial position openings that allows us to decrease a non-recurring loss by 17% without affecting profit. But 17% is not enough. May be somebody has ideas to decrease losses by 30%.

Also, entry into the market is carried out almost at random (by crossing 2 waves). But I'm not going to enter it now, because if we don't increase profitability and don't decrease drawdown, the entry is of no use.

Right now the percentage of profitable positions =56%.

Of course I have a detailed description of algorithm, but it is not useful here, because it takes 17 sheets, if anyone is ready to cooperate and offer real ideas, I will send them all.

 

About a year ago I took the infamous fxclon (a similar reverser, which caused a lot of f*ck on forums and a lot of batshit after a specific explanation that they were cheated) and just on paper started to cut off everything unnecessary that was deliberately added to it to increase commission for the EA's owner. For example, it makes no sense to open in both directions, it is better to open in one direction, and it makes absolutely no difference which one, using this approach we can earn in 2 and 1 step (it depends on which direction), rather than 2 and 2 as the author has. I have tried so many cutoffs and have tried so many approaches. It all went into a very simple technique. We open in 1 direction (randomly (by indicator or pseudo-random numbers)) and pull Stop Loss+reversal indicator after the price; if we reach profit or absorb losses (if stop loss is taken), we remove reversal indicator and put initial lot instead. That is all. There is nothing else to cut off and invent. Also later there was one man's order with the same approach but with phase-by-phase loss taking, it was of no use at all.

In general similar approaches are surprisingly identical to a roulette game when you bet on black/red, if stop loss is less than take profit, then betting goes to a field of 1/3 or just covers part of the field with chips, so I recommend you play online casino on demo money and quickly enough check all the theories. So, here's why I remembered the casino, as you know in all casino games in the normal game player has a negative mathematical expectation, while the casino is positive, ie whatever the player would not do he will always be in the black with an infinite number of games, and nadyatsya to win in a short period akin to a lottery (not take advertising lotteries where the fund more contribution players, such does not participate only fool, but it is extremely rare). Why negative? because black/red chance is always less than 50% and a new roll of the ball does not depend on the past (your past losing trade does not say that the chance of winning if you turn around or continue in the same direction is greater than 50%) (compare with other games and see for yourself). But there is a game of Black Jack, in which the current draw depends on the past, due to the fact that play a limited number of cards that are not mixed for a long time, and one or another simple technique can calculate what's left in the deck and what your chances of getting a particular card. They even made a movie based on this methodology, by the way, about MIT students, it's called "Twenty-One", it's a good movie, check it out. But my point is that you can win/earn money (underline =) ) only if you calculate the odds of the next move. Such a strategy does not allow to do so, and therefore has no right to life.

Bottom line: you need to find a strategy or situation that objectively gives a chance to earn more than 60-65% (to cover spreads and commissions) and then you can try to pick up MM, but not a martyr, for such purposes is very useful book by Ralph Vince - The Mathematics of Money Management. Yes, he says that with less than 50% chance of winning you can always win, but we are talking about a situation where the stop is several times less than the profit.

 

put the report without martin ( for example coefficient of multiplication of martin = 1 ). and a picture - and you will be surprised and have a reason to talk

 

Spring, spring. I am not alone in my aggravation.

The idea is this. To get away from the classic martin you can play with flip levels and profit levels. Come visit https://www.mql5.com/ru/forum/138220 A martin is described in which the build-up of a position at flips 1,2,2,4,4,8,8,16,16 etc by shifting the flip level. It is worth noting that if you take the pattern of price change as a random walk then no martin will give a positive mathematical expectation without taking the spreads into account.

 

Yes, with the lot multiplier the result is quite interesting with 100$ about 20$ for the month. Attached is the report. 15 minute pound. Over the year it comes out to about the same amount.

Files:
nomartin.zip  20 kb
 

Honestly a bad result (why checkpoints, by the way)

 
By the way, keep made a good point. I mean, why is the entry point given only a minor role? I understand that the task is to set up a good margin, but let's not forget that a margin is a way of managing capital. And at the heart of it all is a system. But that is not the point. I will be in the evening - I will outline some ideas for this approach. I have some work to do.
 
keep87:

About a year ago I took the infamous fxclon (a similar reverser, which caused a lot of f*** on forums and a lot of batshit after a specific explanation that they were cheated) and simply started to cut off everything unnecessary that was deliberately added to it to increase the commission for the EA's owner. For example, it makes no sense to open in both directions, it is better to open in one direction, and it makes absolutely no difference which one, using this approach we can earn in 2 and 1 step (it depends on which direction), rather than 2 and 2 as the author has. I have tried so many cutoffs and have tried so many approaches. It all went into a very simple technique. We open in 1 direction (randomly (by indicator or pseudo-random numbers)) and pull Stop Loss+reversal indicator after the price; if we reach profit or absorb losses (if stop loss is taken), we remove reversal indicator and put initial lot instead. That is all. There is nothing else to cut off and invent. Also later there was one man's order with the same approach but with phase-by-phase loss taking, it was of no use at all.

In general similar approaches are surprisingly identical to a roulette game when you bet on black/red, if stop loss is less than take profit, then betting goes to a field of 1/3 or just covers part of the field with chips, so I recommend you play online casino on demo money and quickly enough check all the theories. So, here's why I remembered the casino, as you know in all casino games in the normal game player has a negative mathematical expectation, while the casino is positive, ie whatever the player would not do he will always be in the black with an infinite number of games, and hope for a short term win akin to a lottery (not take advertising lotteries where the fund more contribution players, such does not participate only fool, but it is extremely rare). Why negative? because black/red chance is always less than 50% and a new roll of the ball does not depend on the past (your past losing trade does not say that the chance of winning if you turn around or continue in the same direction is greater than 50%) (compare with other games and see for yourself). But there is a game of Black Jack, in which the current draw depends on the past, due to the fact that play a limited number of cards that are not mixed for a long time, and one or another simple technique can calculate what's left in the deck and what your chances of getting a particular card. They even made a movie based on this methodology, by the way, about MIT students, it's called "Twenty-One", it's a good movie, check it out. But my point is that you can win/earn money (underline =) ) only if you calculate the odds of the next move. Such a strategy does not allow to do so, and therefore has no right to life.

Bottom line: you need to find a strategy or situation that objectively gives a chance to earn more than 60-65% (to cover spreads and commissions) and then you can try to select the MM, but not a martyr, for such purposes is very useful book by Ralph Vince - The Mathematics of Money Management. Yes, he says that with less than 50% chance of winning you can always win, but we are talking about a situation where the stop is several times less than the profit.


Why not? It's about tracking a market trend, such as the amplitude of fluctuations and the period of these fluctuations, and they depend on the past and as far as I know they change quite smoothly, i.e. they tend to persist for a short period of time. But thanks for the book, I will read it, in any case I will learn something useful. The monkey in this case is not considered as a tool for break-even trading, but as a tool to accumulate profits. After all, the chance of catching the trend is much higher in five times than in one, and the growth of the lot may potentially allow profits to grow proportionally. I would like to place a bet on the fact that profits will eventually happen more often than losses. You just have to keep track of when the trend ends and when to close the profit. In contrast to roulette, the market has more instrumental possibilities, we have to choose not just to bet on red, but when, in what interval to add or remove a part of a position, and how much to bet. Besides, there are some constantly working regularities on the market. The same trend can be seen as a situation when a long period of time falls red....
 
sayfuji:
By the way, keep made a good point. I mean, why is the entry point given only a minor role? I understand that the task is to set up a good margin, but let's not forget that a margin is a way of managing capital. And at the heart of it all is a system. But that is not the point. I will be in the evening - I will outline some ideas for this approach. I have some ideas.


The aim is not to predict the price movement but to catch it. In other words, we should wait for the movement and make profit from it.
 

Author, do you think that having a 17-page system makes it more valuable?)

 
YOUNGA:

Honestly a bad result (why checkpoints, by the way)




There's no effect on the checkpoints, or on all ticks. It's just that the checkpoints work faster, the ticks take 1 month and 1.5 hours to test.
Reason: