New MetaTrader 5 Platform Build 5260: Enhancements in Algo Forge and new inheritance rules in MQL5

What's new in MetaTrader 5

5 September 2025

Terminal

  1.  Fixed display of margin settings in trading symbol specifications. Previously, when floating leverage was used (e.g., calculated based on account position volume), margin parameters in contract specifications could be shown incorrectly.
  2.  Fixed order book sorting for symbols with negative prices allowed. Orders with positive, negative, and zero prices are now displayed correctly and in proper order. 
  3. The terminal user guide now includes a new section How the Tester Downloads Historical Data. It summarizes the key points needed to understand how the Strategy Tester works with trading history. To ensure calculation stability, the tester always loads a "pre-start history buffer":
  4. If the available history is insufficient, the tester automatically shifts the actual start date forward to the nearest point that meets the requirements.

    In such cases, testing begins later than the date specified by the user. The tester log will show a relevant message, for example:

    start time changed to 2024.03.15 00:00 to provide data at beginning
  5. Added translation of the terminal interface into Irish.
  6. Updated user interface translations.

MQL5

  1. Added five new OpenBLAS methods in the Matrix Balance section, expanding functionality for square matrices. The new set of functions provides:
    • Matrix balancing for improved accuracy in eigenvalue calculations.
    • Back transformations of eigenvectors.
    • Reduction to Hessenberg form and Schur decomposition, including orthogonal matrix generation.

    These methods give developers a complete transformation cycle, from preliminary matrix preparation to precise and stable spectrum computation.

    The methods are based on LAPACK algorithms (GEBAL, GEBAK, GEHRD, ORGHR, HSEQR), ensuring high performance and reliability:

    • MatrixBalance: Balances a general real or complex matrix by permuting rows and columns and applying diagonal similarity transformations. Balancing may reduce the 1-norm of the matrix and improve the accuracy of the computed eigenvalues and/or eigenvectors (LAPACK function GEBAL).
    • EigenVectorsBackward: Forms the right or left eigenvectors of a real or complex general matrix by backward transformation on the computed eigenvectors of the balanced matrix (LAPACK function GEBAK). 
    • ReduceToHessenbergBalanced: Reduces a real or complex general balanced matrix to upper Hessenberg form by an orthogonal similarity transformation (LAPACK function GEHRD).
    • ReflectHessenbergBalancedToQ: Generates orthogonal matrix Q which is defined as the product of elementary reflectors of order n as generated by reducing to Hessenberg form (LAPACK function ORGHR).
    • EigenHessenbergBalancedSchurQ: Computes the eigenvalues of a Hessenberg matrix and the matrices T and Z from the Schur decomposition; optionally computes the Schur factorization of an input matrix reduced to the Hessenberg form (LAPACK function HSEQR).


  2. Added two new methods in the Eigen Values section. Both functions efficiently compute eigenvectors after Schur decomposition, completing the full set of linear algebra tools in MQL5:

    • EigenVectorsTriangularZ: Computes eigenvectors of a real upper quasi-triangular or complex upper triangular matrix (Schur form). Uses the decomposition A = Q · T · Qᴴ (LAPACK function TREVC). Provides high accuracy.
    • EigenVectorsTriangularZBlocked: Block version for computing eigenvectors of a real upper quasi-triangular or complex upper triangular matrix (LAPACK function TREVC3). Faster but not so accurate.
  3. Introduced an important change in inheritance with the new method hiding rule

    Previously, if a derived class or structure defined a method with the same name as in the base class, overloading was performed: all versions (from both the parent and child) were available in the derived class. Now, methods with the same name in a derived class hide base class methods (method hiding).

    To call a hidden base class method, you must explicitly specify its scope when calling it:
    class Base
      {
    public: 
       void Print(int x)   { ::Print("Base int: ", x); }
       void Print(double y){ ::Print("Base double: ", y); }
      };
    
    class Derived : public Base
      {
    public:
       void Print(string s){ ::Print("Derived string: ", s); }
      };
    
    void OnStart()
      {
       Derived d;
       d.Print("text");    // call of Derived::Print(string)
       d.Print(10);        // ATTENTION! Calling Derived::Print(string) since Base::Print is hidden (inaccessible)
       d.Base::Print(10);  // explicit call to hidden parent method
      }
    For some time, the MQL5 compiler will issue a warning if a hidden base method is a better match for the call parameters than the available derived method. Example for the above code d.Print(10):
    call resolves to 'void Derived::Print(string)' instead of 'void Base::Print(int)' due to new rules of method hiding
       see declaration of function 'Derived::Print'
       see declaration of function 'Base::Print'
    implicit conversion from 'number' to 'string'

  4. Added the using operator for restoring base class method overloads.

    To control the new behavior, MQL5 introduces the 'using' operator. It allows you to "pull" all overloads of a method from the base type into the scope of a class or structure:
    class Base
      {
    protected:
       void Print(int x)   { ::Print("Base int: ", x); }
       void Print(double y){ ::Print("Base double: ", y); }
      };
    
    class Derived : public Base
      {
    public:
       void Print(string s){ ::Print("Derived string: ", s); }
       using Base::Print;  // return Print overloads from Base
      };
    
    void OnStart()
      {
       Derived d;
       d.Print("text");   // Derived::Print(string)
       d.Print(42);       // Base::Print(int)
       d.Print(3.14);     // Base::Print(double)
      }
    If 'using Base::Print;' is removed, then calls to d.Print(42) and d.Print(3.14) will be unavailable; only Derived::Print(string) will remain.

    Additionally, in this example, you can see that protected methods from the base class become accessible in the derived class (their visibility changes from protected to public).

    This gives developers more flexible and predictable control over class hierarchies, allowing them to precisely define which base class method overloads should remain accessible in derived types.

MetaQuotes Language Editor

  1. Accelerated SHA-1 hash calculations for Git operations in Algo Forge. Performance improvements exceed 40% for bulk operations.
  2. Fixed file modification checks for Git operations. If only the modification time changes but the file content remains the same, the file is no longer treated as modified. This eliminates false detections and prevents conflicts with remote repositories.

Algo Forge

Published MQL5 Algo Forge User Guide. It highlights all the key benefits of Git without unnecessary complexity:

  • reliable version history storage and branching,
  • fast experimentation and safe merging of changes,
  • create your own repository or fork other developer' projects in one click,
  • transparent team collaboration with tracked contributions,
  • a catalog of open projects with the opportunity to learn from others.

  • Cloning Another Developer's Project
    Open the project you want to clone on forge.mql5.io and click Fork. Enter a name and description for the fork and save.

    Cloning a project

    In MetaEditor, using the same MQL5 account, run the Refresh command in the Navigator. Your fork will appear in the Shared Projects folder. Download it from Algo Forge using Git Clone. You'll receive not only the project files but also its full commit history and all branches. This means you can continue working on the fork while still having the entire history of the cloned project.  

    Git Clone command in Algo Forge


Web Terminal

  1. Fixed display of trading and quoting sessions in symbol specifications.
  2. Fixed display of margin settings display in symbol specifications.
  3. Fixed display of trading and quoting sessions in symbol specifications.
  4. Added support for Contest account type. Such accounts are displayed in blue, while demo accounts appear in green.
  5. Fixed accuracy of floating leverage margin calculations under certain conditions. 
  6. Fixed an issue when opening a new account where the Next button sometimes failed to proceed to the next step.
  7. Fixed an issue where it was not possible to place a limit order between Bid and Ask prices for Exchange execution.
  8. Fixed display of order execution prices. Once an order is sent, its execution results appear in the window: a successful trade operation or a reason why it has not been executed. In some cases, the execution price was incorrectly shown as "0".
  9. Fixed an issue where the quick position close button was not displayed.

    Position closing button

  10. Fixed display of trading account currencies in the account selection window.