New MetaTrader 5 Build 5570: ONNX and Chart Rendering Improvements

In this version, we have improved ONNX support in MQL5. Models now run significantly faster on GPUs with CUDA support

29 January 2026

Terminal

  1. Fixed text rendering on charts in macOS and Linux environments using Wine.
  2. Corrected the drawing of indicators displayed as lines with variable colors.
  3. Fixed rendering of Text Label and Button objects.
  4. Corrected formatting of certain statistics in trading reports, which could previously round incorrectly.
  5. Revised calculation of "Total Profit" and "Total Loss" in trading reports. These values now include commissions and swaps.
  6. Fixed saving the toolbar state for undocked charts. Hidden toolbars could reappear after restarting the platform.
  7. Fixed loading of custom trading instrument settings from JSON files. In particular, swap settings, trading sessions, and tick values could be imported incorrectly.
  8. Added instrument and timeframe display in the window title when running a script on a chart.



    Added instrument and timeframe display in the window title when running a script on a chart


  9. Fixed duplication of trading instruments in the tooltip displayed when searching instruments in the Market Watch.
  10. Fixed rendering of Wingdings fonts on charts.
  11. Fixed rendering of indicators displayed as colored candlesticks (DRAW_COLOR_CANDLES) and colored lines (DRAW_COLOR_LINE).
  12. Added output of a log message indicating that the broker's server is running an outdated version. If the server version is below 5200, released six months ago, a warning will be displayed:
    outdated server build - must be at least 5200, contact your broker please
    The message is displayed for informational purposes only and does not affect the ability to connect to the server.
  13. Updated user interface translations.

MQL5

  1. ONNX library now loads on the first run of an MQL5 program that uses ONNX, rather than with the platform. Library updates occur automatically.
  2. Added CUDA support for ONNX. If your graphics card supports this technology, model inference performance will be significantly improved. We strongly recommend updating NVIDIA drivers to improve stability and performance.
    CUDA usage permissions can be managed in the platform settings: 


    CUDA usage permissions can be managed in the platform settings


  3. Updated flags in the ENUM_ONNX_FLAGS enumeration. These flags are used when creating and executing ONNX models:

    Logging
    Instead of the deprecated ONNX_DEBUG_LOGS, the following logging flags are now used:

    • ONNX_LOGLEVEL_VERBOSE — log all messages.
    • ONNX_LOGLEVEL_INFO — log informational messages, warnings, and errors. Replaces the deprecated ONNX_DEBUG_LOGS.
    • ONNX_LOGLEVEL_WARNING — log warnings and errors. Used by default.
    • ONNX_LOGLEVEL_ERROR — log errors only.

    CUDA and GPU Management
    The ONNX_CUDA_DISABLE flag has been removed. Use the new ONNX_USE_CPU_ONLY flag instead. When enabled, only the CPU will be used for model execution.

    Flags have been added to select the GPU device on which the model will be executed:

    • ONNX_GPU_DEVICE_0
    • ONNX_GPU_DEVICE_1
    • ONNX_GPU_DEVICE_2
    • ONNX_GPU_DEVICE_3
    • ONNX_GPU_DEVICE_4
    • ONNX_GPU_DEVICE_5
    • ONNX_GPU_DEVICE_6
    • ONNX_GPU_DEVICE_7

    Use these flags if the system has two or more CUDA-capable devices. If multiple flags are specified, the device with the lowest index will be selected.

    Model Profiling
    We've added the ONNX_ENABLE_PROFILING flag to enable ONNX model profiling.

    When a model is started with this flag enabled, a profiling report file with the name: [EX5 file name]_[date]_[time].json will be created in the /MQL5/Files/OnnxProfileReports/ folder.

  4. Increased the limit for files that can be included in a program as a resource. The new limit is 1 GB, allowing you to include large ONNX models in projects. 
  5. Improved stability for OpenCL operations.
  6. Added ReplaceToZero method. It replaces small values in a matrix/vector with zero values and returns the number of replaced elements.
  7. Added new OpenBLAS methods:

    • FactorizationLDLComplexSyRaw — computes the factorization of a complex matrix using the Bunch-Kaufman diagonal pivoting method.
    • LDLComplexSyLinearEquationsSolution — solves a system of linear equations A * X = B with a complex symmetric indefinite matrix using the factorization A = U**T * D * U or A = L * D * L**T computed by FactorizationLDLComplexSyRaw, with multiple right-hand sides.
    • LDLComplexSyInverse — computes the inverse of a complex symmetric indefinite matrix using the factorization A = U**T * D * U or A = L * D * L**T computed by FactorizationLDLComplexSyRaw.
    • LDLComplexSyCondNumReciprocal — estimates the reciprocal of the condition number of a real symmetric or complex Hermitian indefinite matrix A, using the LDLT factorization computed by FactorizationLDLRaw.

  8. Added the ColorToPRGB function. It converts the color type to uint to get a PRGB color representation. This format is used when creating graphic resources, rendering text, and in the standard library CCanvas class when working with the COLOR_FORMAT_ARGB_RAW color format.
    uint  ColorToPRGB(
       color  clr,          // the color to be converted, in 'color' format
       uchar  alpha=255     // the alpha channel that controls color transparency
    );
    The PRGB color is calculated using the following formula:
    R = R * A / 255
    G = G * A / 255
    B = B * A / 255
    A = A
  9. Fixed programmatic text setting for OBJ_LABEL, OBJ_TEXT, OBJ_BUTTON, and OBJ_EDIT objects. The text might not be displayed under certain conditions.
  10. Fixed setting colors for graphical objects using ObjectSetInteger. The value clrNONE could previously be ignored.
  11. Fixed Bars function freezing when no price history is available on the server.
  12. Fixed global variable search in scopes. Previously, variables inside a namespace could not have the same names as global-level variables.
  13. Fixed operation of the final attribute. Attempting to override a function marked as 'final' now correctly produces a compiler error.
  14. Fixed false compiler warnings that occurred when using function forward declarations in included *.mqh files without the #import directive. The compiler now correctly handles such declarations and does not require #import if the functions are not imported from a DLL.

    Example

    File utils.mqh: 
    // Function forward declaration
    double CalcLot(double risk, double stop);
    File expert.mq5:
    #include "utils.mqh"
    
    double CalcLot(double risk, double stop)
      {   
       return risk / stop;
      }
    Previously, the compiler could issue a warning that the CalcLot function in utils.mqh was missing the #import directive, even though the function is user-defined and implemented in the project code. Such code now compiles without warnings. The #import directive is required only for functions actually imported from external DLLs. 

MetaEditor

  1. Fixed out-of-memory errors when working with large source files (megabytes).
  2. Fixed display of enumeration values and names in the Watch window during debugging.

Tester

  1. Fixed termination of testing for looping Experts Advisors. Even with infinite loops, pressing "Stop" now halts execution immediately.
  2. Fixed EventChartCustom call during visual testing. Previously, the event could be mistakenly sent twice.
  3. Corrected freeze level check (SYMBOL_TRADE_FREEZE_LEVEL) when deleting newly placed pending orders.
  4. Fixed export of forward-testing data. When exporting a test that did not use forward mode, data from previous forward tests could sometimes be saved.

Web Terminal

  1. Added display of approximate profit/loss in money when setting Stop Loss or Take Profit on the chart.


    Added display of approximate profit/loss in money


  2. Fixed display of symbol specifications for instruments with special characters.
  3. Corrected display of negative prices in trade dialogs.
  4. Fixed display of account financial metrics for cases where the deposit currency has precision greater than two decimal places.