HistorySelect(0,TimeCurrent());
Such a construction with a large number of orders in the history will slow down a lot. Recently Roche published an article on how to copy orders for the last 24 hours into the cache. I put it into my Expert Advisor and MM stopped slowing down the tests.
Such a construction with a large number of orders in the history will slow down a lot. Recently Roche published an article on how to copy orders for the last 24 hours into the cache. I put it into my Expert Advisor and MM stopped slowing down the tests.
Thank you for your attention.
The code is given for example.
Since the Expert Advisor is not tied to a specific timeframe, there is no possibility to determine the necessary depth of the trade history query.
For example, when testing (or working) on daily candlesticks, the history for the last 24 hours will hardly help you.
So, choose the depth of history based on the specific situation (as you have done).
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article MQL5 Wizard: How to Create a Risk and Money Management Module is published:
The generator of trading strategies of the MQL5 Wizard greatly simplifies testing of trading ideas. The article describes how to develop a custom risk and money management module and enable it in the MQL5 Wizard. As an example we've considered a money management algorithm, in which the size of the trade volume is determined by the results of the previous deal. The structure and format of description of the created class for the MQL5 Wizard are also discussed in the article.
Author: MetaQuotes