The MetaTrader 5 platform update will be released on Friday, October 9, 2020. The new version features the following changes:
- Terminal: The Options tab features a new setting entitled “Preload chart data for open positions and orders”.
In order to save traffic, the trading platform downloads symbol price history only when the relevant data is requested, for example, when the price chart is opened or when testing is launched. However, this may not always be convenient for actively used symbols. If you enable the new option, the charts of the symbols for which you have open positions or pending orders, will be updated in the background mode whenever you launch the platform. Thus, you will not have to wait for data download after chart opening. The relevant data will be immediately available for analysis.
- Terminal: Fixed generation of daily bars after weekends.
- Terminal: Fixed chart updating. Charts could occasionally fail to update after the additional download of updated price data.
- Terminal: Optimized updating of the account trading history cache. The optimization enables the reduction of data delays when using History* functions.
- Terminal: Fixed display of the Comment column when displaying trading history as positions.
- Terminal: Fix ed display of the Signal subscription renewal button.
- MQL5: More improvements within the total update of the code profiler. The following functions have been implemented in addition to the innovations presented in build 2615:
Added new parameters
We have previously announced the usage of the Sampling method for the new profiler. The profiler makes pauses in the MQL program operation (~1000 times per second) and collects statistics on how many pauses were performed in certain code segments. This also includes the analysis of call stacks to determine the share of each function in the total code operation time. After profiling, users receive statistics on how many times the operation was paused and how many times each of the functions appeared in the call stack:
- Total CPU [unit,%] ? how many times the function appeared in the call stack.
- Self CPU [unit,%] ? the number of “pauses” which occurred directly within the specified function. This variable is crucial in identifying bottlenecks: according to statistics, pauses are more frequent when extra processor time is required.
Added ability to disable function inlining during profiling
During the compilation of MQL programs, functions are inlined, i.e. the function code is added directly to the function call site. This enables significant performance acceleration. However, this procedure makes the profiling of functions difficult. In order to obtain a report o n “pure” functions, you can disable inlining in the MetaEditor settings:
Updated report design
We have redesigned the profiling report and the presentation of profiling information in the source code window. The modernized design will be more familiar to Visual Studio users.
- MQL5: Fixed CopyTicksRange function operation. The function could sometimes return incomplete data.
- MQL5: New error code TRADE_RETCODE_HEDGE_PROHIBITED ? opening of a position or placing of a pending order is not allowed because hedge positions are prohibited. The error is returned if a user tries to execute a trading operation in the case the hedging is disabled for the account, and the user already has an opposite order or position for the same symbol.
- MQL5: Removed the ability to call MessageBox when debugging indicators. MessageBox cannot be called from indicators because it suspends the thread execution for the whole time, while waiting for the user’s response.
- MQL5: Optimized and significantly accelerated addition of trading instruments to the Market Watch using the SymbolSelect function.
- MQL5: Fixed ArrayInsert function behavior for fixed-sized arrays. Now, the behavior corresponds to its description in the documentation: when elements are inserted, the size of the destination array does not change and the elements to t he right of the insert position are shifted to the right (the last ‘count’ elements are “dropped off”), while the elements are copied from the source to the released space.
- Tester: Fixed working with custom trading condition settings during testing; the settings dialog has been revised.
- Fixed calculation of custom commissions. To enable commissions, it is now enough to specify the symbol name rather than the entire path.
- Rearranged tabs for more efficient operation.
- Renamed the dialog and the option enabling custom settings.
- Optimized column width in the settings tables.
- When the “Use custom settings” option is disabled, all other settings in the dialog are deactivated. Previously, the settings remain ed editable, and users could have mistakenly thought that the settings would be applied during testing.
- Tester: Fixed an occasional error related with the receiving of orders from the trade history by ticket.
- MetaEditor: Added color scheme presets for the code editing window: light (default), dark and blue. You can customize the editor without having to configure the editor view manually.
Additionally, it is now possible to customize the border color for the function tooltips.
- MetaEditor: All icons in the toolbars have been updated to support HiDPI monitors.< /li>
- Documentation has been updated.
The update will be available through the Live Update system.