Discussion of article "Developing a self-adapting algorithm (Part I): Finding a basic pattern"

 

New article Developing a self-adapting algorithm (Part I): Finding a basic pattern has been published:

In the upcoming series of articles, I will demonstrate the development of self-adapting algorithms considering most market factors, as well as show how to systematize these situations, describe them in logic and take them into account in your trading activity. I will start with a very simple algorithm that will gradually acquire theory and evolve into a very complex project.

The EA features the ability to re-invest the earned funds. You need to use it. Until now, I showed the tests with conservative settings. But what if we set very aggressive settings and enable a lot increase? I am not a fan of high risks, but let's see what the algorithm is capable of. I will perform the test on GBPUSD from 2006.01.01 to 2020.11.25 in the "Every tick" mode. Of course, it is possible to test another symbol. The spread is reduced to 20. This is slightly above average. Figure 12 shows the backtest result for almost 15 years.


GBPUSD max risk

Figure 12. GBPUSD from 2006.01.01 to 2020.11.25, aggressive settings

As you may remember, the algorithm uses close prices. Therefore, this result is not a "test grail". In addition, the adequate spread of 20 is set. The algorithm's trading result on the real market usually coincides with the one obtained in the tester. I have never used it to trade with such aggressive settings. Besides, it is impossible to take into account real spreads in MetaTrader 4, so I will not argue that it would have passed this period as well in real trading.

Author: Maxim Romanov

 

Simple question, why MT4? MT5 also works with Forex, as it seems....

Imho, this strategy is a kind of mean reversion.... The main thing here is not to get into thick tails of distribution: the left one - if we buy and the right one - if we sell.... or the deposit will burst at the seams... or you need to add some kind of protection... eternal problem :-)

By the way, on the form of the distribution itself. Maxim, you write:

...На рисунке 1 визуализировано то, что я описал выше. Тут красным цветом показано эталонное распределение приращений, черным цветом распределение приращений для ценового ряда с большим числом выборок. Фиолетовым, зеленым и голубым цветами показано распределение приращений ценового ряда на малом числе выборок.

Reference in what sense? If my eyes do not fail me, I see a normal distribution. In the financial markets, a distribution with thick tails can be considered as a benchmark.... in the sense that in the long term we'll get fat tails...

Yes, thanks for the material. Interesting and reasoned as always.... without water

 

The approach is really not complicated. Deviation with a return to the average. Only not the price deviation is used, but the deviation of candlestick colours.

It will be interesting to know the continuation.

 
Denis Kirichenko:

Simple question, why MT4? MT5 also works with Forex, as it seems....

Imho, this strategy is a kind of mean reversion.... The main thing here is not to get into thick tails of distribution: the left one - if we buy and the right one - if we sell.... or the deposit will burst at the seams... or you need to add some kind of protection... eternal problem :-)

By the way, on the form of the distribution itself. Maxim, you write:

Reference in what sense? If my eyes do not fail me, I see a normal distribution. In the financial markets, a distribution with thick tails can be considered as a benchmark... in the sense that in the long term we'll get fat tails...

Yes, thanks for the material. Interesting and reasoned as always.... without water

I made this robot in 2014, then I was still on mt4, now there is no sense to remake it, then there will be another robot for mt4, a complicated version of this one, and the third version will move to mt5. And it will become really interesting there.

As for thick tails, if you prepare the data correctly, there will be no such tails, it will be a normal distribution, I wrote about it in my first article, that's where I took the picture from. Here https://www.mql5.com/en/articles/8136 , there is a similar picture you can orientate yourself. And I take the normal one as a reference.

And the deposit, yes, it can crack) But there is a limit on the minimum equity, so that all at once do not put all at once.

Дискретизация ценового ряда, случайная составляющая и "шумы"
Дискретизация ценового ряда, случайная составляющая и "шумы"
  • www.mql5.com
Классический способ представления ценовых движений в виде временных отрезков возник на заре становления финансовых рынков, когда еще не было компьютеров и вся торговля шла на реальных рынках, реальными товарами. Хранить каждое изменение цены в течении дня было трудно, да и не имело смысла, цены менялись не так быстро. Поэтому представлялось...
 
I will try to test in the multi-currency Forex Tester. I will write the results
 
I don't understand. The Expert Advisor should be set only on the pair GBPUSD or????
 

MT5 variant.

#define  MT4_TICKET_TYPE // Obligate OrderSend and OrderTicket to return a value of the same type as in MT4 - int.
#include <KimIVToMT5.mqh> // https://www.mql5.com/ru/forum/93352/page32#comment_10603352

string StringTrimLeft2( const string Str ) { return(Str); }
string StringTrimRight2( const string Str ) { return(Str); }

#define StringTrimLeft StringTrimLeft2
#define StringTrimRight StringTrimRight2

void OnTick() { start(); }

#include "50p_V1.mq4" // https://www.mql5.com/en/articles/8616
 
Figured it out!!!!
 
SonofIsrael Макеев:
I don't understand. The Expert Advisor should be set only on the pair GBPUSD or????.

Everything was solved by itself. The first pair must coincide with the pair of the chart, it can be any pair.

 
Optimising martingale is more dangerous than it seems :)
 
Maxim Dmitrievsky:
Optimising martingale is more dangerous than it seems :)

there is a difference with martingale. There you take a system of raising bets and mindlessly throw on 50% probability of entry. Here I assumed that there is some pattern that will help to make money and the probability is different from 50%.