New MetaTrader 5 Platform build 2815: Access to the Depth of Market from Python, revamped Debugger, and Profiler improvements - page 2

 
ccou:

I confirm, PlaySound returns false as if it hasn't found the sound file... It is a bug because the sound file is in the correct directory...

Please fix this bug asap, thanks

One user reported in Chinese forum that this issue was fixed with new 2816 beta build:

 

milad:

I have a script whenever run with shortcut it load and open chart from a url,today I find out does not create vertical line,after digging I find out what is happening.
ChartApplyTemplate does not work with ObjectCreate, if you comment ChartApplyTemplate  the code work probably:

I think this bug introduce in 2815 build, anybody can confirm or deny that?
 

Profiler improvements? By what criteria? The profiler the way it is treated for quite some time (in build 2817 it is even worse) is useless. Period. 

Just in case somebody needs to know how a profiler looks like, here is one (Intel) example : https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html

Fix Performance Bottlenecks with Intel® VTune™ Profiler
Fix Performance Bottlenecks with Intel® VTune™ Profiler
  • software.intel.com
Use advanced sampling and profiling methods to quickly analyze code, isolate issues, and deliver performance insight on modern CPUs, GPUs, and FPGAs.
 
Mladen Rakic:

Profiler improvements? By what criteria? The profiler the way it is treated for quite some time (in build 2817 it is even worse) is useless. Period. 

Just in case somebody needs to know how a profiler looks like, here is one (Intel) example : https://software.intel.com/content/www/us/en/develop/tools/oneapi/components/vtune-profiler.html

I do agree, it doesn't make any sense to me.
 
#property strict
#property indicator_chart_window

// Uncomment next line to enable new version
//#define NEW_VERSION

#ifndef NEW_VERSION
#property version "1.0"
#property indicator_buffers 1
#property indicator_plots 1
#else
#property version "2.1"
#property indicator_buffers 2
#property indicator_plots 2
#endif

double Buffer0[];

#ifdef NEW_VERSION
double Buffer1[];
#endif


int OnInit()
{
   SetIndexBuffer(0, Buffer0, INDICATOR_DATA);
   PlotIndexSetString(0, PLOT_LABEL, "Close");
   PlotIndexSetInteger(0, PLOT_LINE_WIDTH, 2);
   PlotIndexSetInteger(0, PLOT_LINE_COLOR, clrBlue);
   PlotIndexSetInteger(0, PLOT_DRAW_TYPE, DRAW_LINE);
   
   #ifdef NEW_VERSION
   SetIndexBuffer(1, Buffer1, INDICATOR_DATA);
   PlotIndexSetString(1, PLOT_LABEL, "Open");
   PlotIndexSetInteger(1, PLOT_LINE_WIDTH, 2);
   PlotIndexSetInteger(1, PLOT_LINE_COLOR, clrOrange);
   PlotIndexSetInteger(1, PLOT_DRAW_TYPE, DRAW_LINE);
   #endif
   
   return INIT_SUCCEEDED;
}


int OnCalculate(const int rates_total,
                const int prev_calculated,
                const datetime &time[],
                const double &open[],
                const double &high[],
                const double &low[],
                const double &close[],
                const long &tick_volume[],
                const long &volume[],
                const int &spread[])
{
   int start = prev_calculated == 0 ? 0 : prev_calculated - 1;
   
   for (int i = start; i < rates_total; i++) 
   {
      Buffer0[i] = close[i];
      
      #ifdef NEW_VERSION
      Buffer1[i] = open[i];
      #endif
   }
   return rates_total;
}


We found an issue with the Market Upgrade process on MT5

If you add a new buffer to an indicator on MT5 and publish it to the Market then any existing charts won't get the new buffer

NOTES:

        1) The buffer is also missing from Indicators/Colors dialog and hitting the reset button does not resolve the issue, nor does restarting the terminal

        2) If the indicator is removed from the chart and re-applied then the new buffer will appear as expected (but any parameter changes will be lost)

        3) Templates defined with version 1 of the indicator will also remove the new buffer when applied to version 2 indicators

        4) This appears to be caused by the .chr files in MQL5/Profiles/Default directory that contain <graph> </graph> sections which override the number of buffers defined by the indicator

        5) MetaEditor and the recompile process do some "magic" to upgrade the .chr files and do not suffer from this issue. (This same magic doesn't get applied when the indicators are upgraded in the market)

        6) We have tested this issue in the marketplace, but the same issue can be recreated without the market by deploying ex5 files to a testing directory under Indicators and then overwriting the ex5 files with a new version before restarting the terminal


There is a nasty workaround to add a new <graph> </graph> section to each chr and tpl files, but this isn't something we'd want other users to attempt

 

Hello,

I think the last build of meta editor can't support save file it ending XXXXXv1.2

There is no problem with files ending 1.1, 1.3 and so on.

Files:
ending.PNG  18 kb
 

Hi,

I've downloaded beta release 2828 and I'm experiencing again memory problems during optimalisations with a lots of passes.

Recently this was issue was solved, but I see this problems came back.

I have a AMD3900x CPU of 32 GB RAM.

When these problems arise, I stop the optimalisation and than I restart it again without closing the platform; than it will do the rest of the passes.

I hope it will be solved quickly; this issue has been hanging around longtime !

Thx,

Danny

UPDATE: release 2832 is making this problem even bigger !!!
 
MetaQuotes:

The MetaTrader 5 platform update will be released on Friday, February the 26th, 2021. The new version features the following changes:

  1. Terminal: Added ability to access Depth of Market data via the Python API.

    Three new functions allow quick obtaining of data for statistical calculations and machine learning tasks, which can be implemented using a plethora of out-of-the-box Python libraries.

    • market_book_add — subscribes the MetaTrader 5 terminal to receive events related to changes in the Depth of Market for the specified symbol.
    • market_book_get — returns a tuple from BookInfo containing the Depth of Market records for the specified symbol.
    • market_book_release — cancels MetaTrader 5 terminal subscription to events related to changes in the Depth of Market for the specified symbol.

  2. Terminal: The maximum length of Push messages has been increased from 256 to 1024 characters. Now, you can send more information from your MQL5 programs on mobile devices.
  3. Terminal: Added a preliminary version of the Task Manager, which can be called by pressing the F2 key.

    The Task Manager enables monitoring of resources consumed by the platform. You can view the amount of memory consumed by charts, CPU resources used by Expert Advisors and other performance metrics. If your platform performance slows down, you can easily detect and fix the problem.




  4. Terminal: Enhanced Subscriptions service. A special indication has been added for symbols having delayed quotes:

    • Symbols in Market Watch are marked with a clock icon, and the delay value is displayed in the tooltip
    • Data delay notification is displayed on charts




  5. Terminal: Fixed display of the Subscriptions list when there is no trading account connection.
  6. Terminal: Fixed links in emails and newsletters. All links now open in the default browser. Previously, links opened only in Internet Explorer.
  7. Terminal: Fixed connections from the WebRequest function to hosts with IPv6 addresses and Cloudflare protection.
  8. Terminal: Improved functionality and responsiveness of the VPS service.
  9. Terminal: Improved operation under Wine and MacOS/Crossover, including the version for macOS Big Sur with the M1 processor.
  10. MQL5: Fixed error in the ArrayPrint function. The function could occasionally fail to print arrays.
  11. MQL5: Optimized file operations performed by File* functions. Now, file reading and writing operations run much faster.
  12. MQL5: Removed the restriction requiring the specification of size for the second, third and fourth dimensions of a dynamic array, when the array is used as a function parameter. This increases code reuse and flexibility.
  13. MQL5: Fixed ArrayBsearch function operation. The function could return an incorrect index of the found element during a binary search.
  14. MetaEditor: More new features have become available in the revamped debugger.

    • Arrays are now displayed in the observation window in accordance with the sorting set by ArraySetAsSeries.
    • Added support for local static variables.
    • Fixed display of the specified array element value.
    • Fixed handling of 'static' class fields.
    • Other improvements for more accurate and reliable debugging.

  15. MetaEditor: Added option "Enable optimizations in profiling".

    Code optimization mode can be disabled in order to include more details in the profiling report. Code speed without optimization can be several times slower, but this mode provides a wider code coverage. Please note that with optimization code bottlenecks can be imprecise.

    A milder profiling mode can be set by disabling the "Enable inlining in profiling".



    The optimization management option has also been added to project settings.

    • If optimization is disabled in the project, then the new option is ignored, and thus optimization will always be disabled for profiling (including inlining operations).
    • If optimization is enabled in the project, then the new option will be taken into account during profiling compilation.

  16. MetaEditor: Added logging for debugging and profiling processes. Environment settings are logged at operation start; collected data statistics is logged at operation stop.
    MQL5 profiler    starting 'ExpertMACD.ex5' on history with parameters:
    MQL5 profiler       symbol: 'EURUSD'
    MQL5 profiler       period: 'H1'
    MQL5 profiler       date from: '2021.01.01'
    MQL5 profiler       date to: '2021.02.22'
    MQL5 profiler       ticks mode: 'every tick'
    MQL5 profiler       execution delay: 0 ms
    MQL5 profiler       deposit: 10000
    MQL5 profiler       currency: 'USD'
    MQL5 profiler       leverage: 1:100
    MQL5 profiler       profit in pips: NO
    MQL5 profiler    profile data received (4640 bytes)
    MQL5 profiler    758 total measurements, 0/0 errors, 470 kb of stack memory analyzed
    MQL5 profiler    7782 total function frames found (1929 mql5 code, 342 built-in, 1403 other, 4108 system)
  17. Tester: Fixed specification of non-trading hours in advanced testing settings.
  18. Updated documentation.


The update will be available through the Live Update system.

Hi Metaquotes Team,


I have opened  Just2 Trade MT5 account. They offer more than 10 000/10 287 !!  symbols of financial instruments - see attached file -  but I can see in MT5 Market Watch (build 2832) max 5000 after clicking "Show All". Is it possible to see more or it depends on broker MT5 configuration. Probably it is possible add manually new symbol but it takes me (rest 5287 instruments" a huge of time .

Notes: In MT5 manual I have found that max possible is only 1000 visible symbols in Market Watch?


Best Regards

OldForexTrader

Reason: