2 Attachment(s)
Using indicators for optimizing Expert Advisors in real time
Contents
Attachment 33127
Every time we launch an Expert Advisor on a chart, we face an issue of selecting optimal parameters providing maximum profitability. To find such parameters, we optimize trading strategy on historical data. However, as you know, the market is in constant motion. Over time, the selected parameters lose their relevance.
Attachment 33128
Thus, an EA re-optimization is required. This cycle is constant. Every user chooses the moment of re-optimization on their own. But is it possible to automate that process? What are possible solutions? Perhaps, you have already considered a possibility of program control of the standard strategy tester via running the terminal with a custom configuration file. I would like to offer an unconventional approach and assign the tester functions to an indicator.
more...
1 Attachment(s)
Modeling time series using custom symbols according to specified distribution laws
Quote:
The MetaTrader 5 trading terminal allows creating and using custom symbols in work. Traders have the ability to test their own currency pairs and other financial instruments. The article proposes ways of creating and removing custom symbols, generation of ticks and bars according to the specified distribution laws.
Attachment 33288
Quote:
It also proposes methods for simulating the trend and various chart patterns. Proposed ready-made scripts for working with custom symbols with minimal settings allow traders who do not have MQL5 programming skills to use the full potential of custom symbols.
Contents
more...
1 Attachment(s)
Movement continuation model - searching on the chart and execution statistics
Attachment 33581
This article provides programmatic definition of one of the movement continuation models. The main idea is defining two waves — the main and the correction one. For extreme points, I apply fractals as well as "potential" fractals — extreme points that have not yet formed as fractals. Next, I will try to collect statistical data on the waves movement. The data will be uploaded to a CSV file.
more...
1 Attachment(s)
Gap - a profitable strategy or 50/50?
Attachment 33743
Quote:
Here we will deal with checking D1 gaps on stock markets. How often does the market continue to move in the direction of a gap? Does the market reverse after a gap? I will try to answer these questions in the article, while custom
CGraphic graphs will be used to visualize the results. Symbol files are selected using the system
GetOpenFileName DLL function.
more...
1 Attachment(s)
Reversal patterns: Testing the Double top/bottom pattern
Attachment 33780
Quote:
Contents
The analysis conducted in the article "
How long is the trend?", shows that the price remains in trend for 60% of the time. This means opening a position at the beginning of a trend yields the best results. The search for trend reversal points has generated a large number of reversal patterns. The Double top/bottom is one of the most well-known and frequently used ones.
more...
1 Attachment(s)
Reversing: Reducing maximum drawdown and testing other markets
Attachment 33857
Quote:
In the previous article, we analyzed the reversing strategy. We tested the strategy on two Forex instruments. We also tried to use different indicators to improve the system performance.
As a result, we found out that the reversing strategy can work with an average annual yield of about 50%. But this is a high-risk strategy, because maximum drawdowns could exceed the initial deposit amount. With the initial deposit of 10,000 dollars, the maximum drawdowns on the analyzed financial instruments reached 12,000-15,000 dollars with any indicators. Can this variable be improved? How will the taken measures affect the strategy profitability? This will be the subject of the first part of this article.
After dealing with this issue, we will move on to the second subject — we will try to trade various financial instruments in addition to Forex symbols. We will try to find out, which market is the most optimal for this trading strategy. Are there any considerable differences in reversing trading in different markets.
In all tests within the article, we will use the M15 timeframe and the maximum number of steps in a chain set to 8. The reasons for choosing these parameter values were described
in the previous article.
In addition, we will not use any indicators in all tests, except GBPUSD and XAGUSD. The strategy performs an entry in the fixed direction, once the previous trade chain is closed. For GBPUSD and XAGUSD, entry depends on the CCI indicator values. Testing has shown that CCI can increase profitability for the above symbols.
An archive attached below contains all SET files with proper Expert Advisor settings for each symbol considered in this article. These settings were used for tests, the resulting profit charts of which are presented in the article.
more...
1 Attachment(s)
DIY multi-threaded asynchronous MQL5 WebRequest
Attachment 34016
Quote:
Implementation of trading algorithms often requires analyzing data from various external sources, including Internet. MQL5 provides the WebRequest function for sending HTTP requests to the "outside world", but, unfortunately, it has one noticeable drawback. The function is synchronous meaning it blocks the EA operation for the entire duration of a request execution. For each EA, MetaTrader 5 allocates a single thread that sequentially executes the existing API function calls in the code, as well as incoming event handlers (such as ticks, depth of market changes in BookEvent, timer, trading operations, chart events, etc.). Only one code fragment is executed at a time, while all remaining "tasks" wait for their turn in queues, till the current fragment returns control to the kernel.
more...
1 Attachment(s)
Using OpenCL to test candlestick patterns
Attachment 34100
When traders start mastering OpenCL, they are confronted with the question of where to apply it. Such illustrative examples as multiplication of matrices or sorting large amounts of data are not widely used in the development of indicators or automated trading systems. Another common application — working with neural networks — requires certain knowledge in the area. Studying neural networks can cost a lot of time for a common programmer without guaranteeing any results in trading. This circumstance may turn down those who would like to feel the full power of OpenCL when solving elementary tasks.
more...