New MetaTrader 5 platform build 2650: Background chart loading and MQL5 code profiler improvements

 

The MetaTrader 5 platform update will be released on Friday, October 9, 2020. The new version features the following changes:


  1. 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.




  2. Terminal: Fixed generation of daily bars after weekends.
  3. Terminal: Fixed chart updating. Charts could occasionally fail to update after the additional download of updated price data.
  4. Terminal: Optimized updating of the account trading history cache. The optimization enables the reduction of data delays when using History* functions.
  5. Terminal: Fixed display of the Comment column when displaying trading history as positions.
  6. Terminal: Fixed display of the Signal subscription renewal button.
  7. 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 on "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.




  8. MQL5: Fixed CopyTicksRange function operation. The function could sometimes return incomplete data.
  9. 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.
  10. 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.
  11. MQL5: Optimized and significantly accelerated addition of trading instruments to the Market Watch using the SymbolSelect function.
  12. 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 the 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.
  13. 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 remained editable, and users could have mistakenly thought that the settings would be applied during testing.




  14. Tester: Fixed an occasional error related with the receiving of orders from the trade history by ticket.
  15. 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.



     
  16. MetaEditor: All icons in the toolbars have been updated to support HiDPI monitors.
  17. Documentation has been updated.

The update will be available through the Live Update system.

 

@MetaQuotes https://www.mql5.com/en/forum/347394/page2#comment_18643505

New MetaTrader 4 Platform build 1280
New MetaTrader 4 Platform build 1280
  • 2020.09.17
  • www.mql5.com
The MetaTrader 4 platform update will be released on Friday, July the 24th, 2020. This version provides enhancements for built-in MQL5...
 
Why we can turn of the Search icon, login, LVL, and the progess? I need more space for usable tool not ofr something what I not need.
 

Updates are ready: connect with MetaQuotes-Demo server (open demo account with MetaQuotes-Demo) and updates will be automatically started

 
<..>


Dear friend

I'm using the complete optimization to test some EA, the result is very smart calculated almost complete but not real complete. The issue is I have to run many many times because the result will change every time. 

Could you please kind considering to add a function to run a real total pass result. It will be very helpful and increase the revenue of cloud agent. 

Thank you in advance and best wishes

 
Sky L:
<..>


Dear friend

I'm using the complete optimization to test some EA, the result is very smart calculated almost complete but not real complete. The issue is I have to run many many times because the result will change every time. 

Could you please kind considering to add a function to run a real total pass result. It will be very helpful and increase the revenue of cloud agent. 

Thank you in advance and best wishes

Yes, as I see - you already made a post:
 

When using an undocked chart, the chart automatically includes a toolbar.

This toolbar can be disabled using the context menu (right click), which is awesome.

However, can we get a way to remove it programatically, please?

something like:   

ChartSetInteger(chartID,CHART_UNDOCKED_TOOLBAR, false);


This would be of great value for creating floating toolbars, etc.


Currently I rip the thing out from the WinAPI, which is fine since im already there in order to resize the undocked window itself, but removing the toolbar this way feels a bit like an ugly kludge.


Thanks, eL

 
Sergey Golubev:
Yes, as I see - you already made a post:

Thank you so much, Sergey. 

 

Hi guys,
i found a BUG using minicharts.

Steps to replicate the BUG:

- Open a chart and drop the attached EA (it will simple add a minichart if it not exist)
- keep charts maximazed, and move the focus on an other chart
- Close the terminal and reopne it
- As you can see in expert logs,  minichart's symbol is not the one of object settings, but it is the one of MAIN/REAL chart on which the EA is attacched to.
- now move focus on the EA chart, and ChartSymbol() return now correct value!

So it needs the chart to get focus to keep correct ChartSymbol(MN_ID) value, i beleave this is bug.
This BUG can't allow, at terminal start, using ChartIndicatorAdd because of symbol mismatch.

Please, can you fix it asap?

Thanks a lot!

Antony


EDIT: no need to close/start terminal, it happens every time we create a minichart on not focused chart. 

EDIT2: we get wrong value also for ChartPeriod(MN_ID).

EDIT3: maybe related issue: working on focused chart, if we change minichart object period using " ObjectSetInteger(0,MC_name,OBJPROP_PERIOD, period)" and next immediately call "ChartPeriod(MC_ID)", it not always return right chart period, but we have to wait some time.

Files:
TEST_EA.mq5  12 kb
TEST_EA_v2.mq5  13 kb
 

Sorry, how can I notify the developers of previous reported bug?

I have to contact the service desk?

 

Forum on trading, automated trading systems and testing trading strategies

MT5 and speed in combat performance

Renat Fatkhullin , 2020.10.14 04:23

Released beta 2652, of the important:

  • fixes in Watch List debugger expressions
  • improved compilation interruption (by 22%)
  • dramatic acceleration of access to SymbolInfoTick
  • improvements in the profiler report
  • prohibiting trading when launching expert advisors based on frames in the tester
  • fixed the reset of parameters when pressing the "Reset" button in the parameters of the "Ichimoku Kinko Hyo" indicator