Discussion of article "Separate optimization of a strategy on trend and flat conditions"

 

New article Separate optimization of a strategy on trend and flat conditions has been published:

The article considers applying the separate optimization method during various market conditions. Separate optimization means defining trading system's optimal parameters by optimizing for an uptrend and downtrend separately. To reduce the effect of false signals and improve profitability, the systems are made flexible, meaning they have some specific set of settings or input data, which is justified because the market behavior is constantly changing.

When developing trading strategies, the first task is setting market entry conditions, position tracking method and exit point. Various mathematical, statistical and other analytical methods are applied for that. They are often reinforced with ready-made autonomous systems used to assess market characteristics in the form of indicators. One of the main issues when developing any trading strategy is the lack of versatility. A trading system is not able to work in all possible market conditions with equal efficiency. Therefore, traders usually select conditions for detecting certain (potentially profitable) market conditions when developing Expert Advisors. 

Besides, each trading system has its drawbacks. Trend-following strategies fail during prolonged flat movements, while flat-based ones provide false entries during strong directional movements. To reduce the effect of false signals and improve profitability, the systems are made flexible, meaning they have some specific set of settings or input data, which is justified because the market behavior is constantly changing.

Over time, any trading system becomes less efficient and therefore, there is a need to adapt its parameters to new conditions. The built-in MetaTrader 5 Strategy Tester is meant to tackle this issue. This tool helps analyzing the performance of any trading EA on history and define optimal settings for their further use as a basis in real trading.


Concept of separate optimization

In this article, we will consider applying the Strategy Tester in a broader sense. Obviously, the majority of trading systems trade in two directions (buying and selling under certain conditions). The Fig. 1 shows a simple example of a trading strategy in action under perfect conditions. Its idea is simple — buy at a low price and sell at a high one.

Author: Alexander Fedosov

 

Very interesting article, as always by this author.

I just wanted to add that the separate principle of analysis can be used not only for the two market states mentioned in the article (trend and flat),

but also to the third one, namely correction. Structurally it characterises the market dynamics to a greater extent:

- trend (active, amplitude-expressed part of the movement),

- correction as a reaction to the trend (movement with commensurate but somewhat smaller amplitude relative to the trend, in the opposite direction immediately after the trend),

- flat (movement of much smaller amplitude compared to the trend and correction, without taking into account the direction due to the small amplitude).


Thanks to the author for his excellent work!

 
Aleksandr Masterskikh:

Very interesting article, as is always the case with this author.

I just wanted to add that the separate principle of analysis can be used not only for the two market states mentioned in the article (trend and flat),

but also to the third one, namely correction. Structurally, it characterises the market dynamics to a greater extent:

- trend (active, amplitude-expressed part of the movement),

- correction as a reaction to the trend (movement with commensurate but somewhat smaller amplitude relative to the trend, in the opposite direction immediately after the trend),

- flat (movement of much smaller amplitude compared to the trend and correction, without taking into account the direction due to the small amplitude).


Thanks to the author for his excellent work!

But the final results (for almost four years!) obtained by this or any other Expert Advisor cannot be considered as an example to follow!

 
aleger:

But the final results (for almost four years!) obtained by this or any other Expert Advisor cannot be considered as an example to follow!

Certainly, for real trading, the algorithms of trend and flat identification should be strengthened, as ordinary indicators are not enough for this purpose.

It is necessary to additionally take into account factors related to the structure of price dynamics (more details in my article "How to reduce trader's risks").

But I liked the author's absolutely correct approach - to optimise different market states separately. After all, the traditional approach optimises the whole trading system algorithm, and this is the reason why the vast majority of trading robots perform much worse over a long period of time.

 
Aleksandr Masterskikh:

Of course, for real trading, the trend and flat identification algorithms themselves should be strengthened, as ordinary indicators are not enough for this purpose.

It is necessary to additionally take into account the factors related to the structure of price dynamics (more details in my article "How to reduce trader's risks").

But I liked the author's absolutely correct approach - to optimise different market states separately. After all, the traditional approach optimises the whole trading system algorithm, and this is the reason for much worse results of the vast majority of trading robots over a long period of time.

Yes, there is still a lot of work to be done on this topic, both theoretically and practically, and especially in terms of providing real achievable profitability.

 
MetaQuotes Software Corp.:

Published article Separate optimisation of the strategy on trend and flat:

Author: Alexander Fedosov

 
I don't know why, but MT5 terminal doesn't see mq5 files in Expert Advisors. And when compiling, the error of access to the include folder pops up. Does anyone have the ex5 file of this Expert Advisor?
 
Hi Alexander, thanks for a very interesting read. How do i download the archive files? There are never any links at the bottom of the article. 
 
This is a great educational article but in real actual trading its completely useless . Anything backtesting using 1M OHLC is bound to fail miserably in real trading. So use it for education purpose only but not anywhere near real trading 
 

Dear Alexander, how are you? The concept of your EA is simply amazing. It comes on meet with everything I thought about trade, specially growth and decline speed of bars.

However, i have one question: Is it possible to apply your method on M1 time frame?

Best regards

 

Hello Alexander,

I am looking for a function to identify a flat market to integrate in my MT5 EA. The function should prevent the EA trading an instrument in a flat market resp. a narrow price range.

Could you help me with that?

Best regards

Reinhard