List of changes in MetaTrader 5 Client Terminal builds - page 22

 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 platform build 3081: Improvements in MQL5 services and design updates

MetaQuotes, 2021.09.24 16:48

The MetaTrader 5 platform update will be released on Thursday, October 14, 2021. The new version features the following changes:

  1. Terminal: Improved navigation in MQL5.community services.

    Market, Signals and VPS sections have been moved from the main platform workspace to the Navigator. The new positioning provides easy access to the desired products and enables efficient management of purchases and subscriptions. "How it works" sections have been added to each service, to provide the basic usage information.


    Improved navigation through MQL5.community services


  2. Terminal: All menu and toolbar icons have been completely redesigned. The terminal interface has become more user-friendly:

    • Removed small elements from icons
    • Reduced the number of used colors to avoid color noise
    • Fewer gradients are used to improve readability
    • More straightforward metaphors are used


    All menus, toolbars and dialogs have been redesigned in the platform


  3. Terminal: Added the display of costs resulting from deal execution. The relevant information is shown in the trading history. This feature is used by NFA regulated brokers.


    The account history now shows deal costs>


    If your broker enables cost calculation on the server, the new Costs column will appear in your account trading history. The column shows the deal execution cost relative to the current mid-point price of the symbol (mid-point spread cost).

  4. Terminal: Launched Korean version of MQL5.com.

    This is the eighth language available at MQL5.community, the largest community of algorithmic traders. The website interface, articles, the Economic Calendar and important forum topics are already available in Korean. MQL5 documentation will be translated soon.

  5. Terminal: Fixed loading of custom trading instruments. In some cases, newly created symbol settings could overwrite existing symbol settings.
  6. Terminal: Fixed the on-chart display of the signal trading history. Previously, the relevant option enabled the display of all trades for all financial instruments, and not only for the chart symbols.
  7. Terminal: Added export of the Fee column to the trading history report. Previously the value was only displayed in the history, but it could not be saved to a file.
  8. Terminal: Optimized and accelerated operation of one-click trading panels in Market Watch and on charts.
  9. Terminal: Fixed operation of the Margin Ratios field for custom trading instruments. The values could be reset to zero under certain conditions.
  10. Terminal: We continue implementing the Subscriptions service through which traders can purchase additional trading services from brokers. Fixed errors in the quotes subscription window.
  11. Terminal: Fixed display of the Trend Line analytical object. Previously the line could disappear upon scaling or upon chart window resizing.
  12. Terminal: Fixed display of the Rectangle analytical object. The object could disappear if one of the anchor points was beyond the chart visibility area.
  13. Terminal: Fixes and operation speed improvements related to operation of built-in MQL5.community charts.
  14. Terminal: Fixed rounding of the Value parameter in the list of open positions. The fractional part could be hidden in previous versions.
  15. Terminal: Fixed mobile phone verification during the account opening process. Phone numbers could be identified as incorrect for some Chinese operators.
  16. Terminal: Added support for MQL5 account passwords longer than 32 characters.
  17. Terminal: Fixed export of certificates when working in Wine. This option is used for accounts with extended authentication, when migrating such accounts from desktop to mobile.
  18. Terminal: Fixed buttons opening MQL5 services in the lower panel of the Toolbox window. The buttons were inactive when the window was undocked.
  19. Terminal: Added limitation on the "File \ New Chart" menu size. Now the menu can contain no more than 128 submenus with symbol groups, each having no more than 32 symbols. The limitation speeds up the terminal operation and avoids freezing when adding a large number of trading symbols (2,000 or more) to Market Watch.
  20. MQL5: We continue adding vector and matrix support. The new functions will significantly expand the possibilities for neural network-based solution developers.
  21. MQL5: Added DEAL_SL and DEAL_TP values in the ENUM_DEAL_PROPERTY_DOUBLE enumeration — the Stop Loss and Take Profit levels of a deal.

    The relevant values for entry and reversal deals are set in accordance with the Stop Loss/Take Profit of orders, which initiated these deals. The Stop Loss/Take Profit values ​​of appropriate positions as of the time of position closure are used for exit deals.

  22. MQL5: Added the MQL_HANDLES_USED value in the ENUM_MQL_INFO_INTEGER enumeration — the number of active class objects (handles) in an MQL program. These include both dynamic (created via new) and non-dynamic objects, global/local variables or class members. The more handles a program uses, the more resources it consumes.

  23. MQL5: Added new methods for working with the MqlCalendarValue structure which describes an economic calendar event:

    • HasActualValue(void) — returns true if the actual value is set; otherwise returns false
    • HasForecastValue(void) — returns true if the forecast value is set; otherwise returns false
    • HasPreviousValue(void) — returns true if the previous value is set; otherwise returns false
    • HasRevisedValue(void) — returns true if the revised value is set; otherwise returns false
    • GetActualValue(void) — returns the actual value of an event (double) or nan if the relevant value is not set
    • GetForecastValue(void) — returns the forecast value of an event (double) or nan if the relevant value is not set
    • GetPreviousValue(void) — returns the previous value of an event (double) or nan if the relevant value is not set
    • GetRevisedValue(void) — returns the revised value of an event (double) or nan if the relevant value is not set

  24. MQL5: Fixed debugging of the MQL5 programs which use libraries in the form of EX5 files.
  25. MQL5: Accelerated compilation of programs containing large arrays initialized by a sequence.
  26. MQL5: Fixed execution of the CopyTicksRange function with custom trading symbol data. The function could return data out of the requested period.
  27. MQL5: Fixed verification of the availability of all template parameters during specialization by parameters. Code compilation with debug templates could cause "code generation error" under certain conditions.
  28. Signals: Added capability to automatically renew Signal subscriptions.

    Your subscription will not end abruptly, as the system will automatically renew it for another month through the payment method that you previously used for the initial subscription purchase.


    Enable auto renewal for your Signal subscription


    If you made your previous payment using a card and the renewal payment fails, the system will try to make a payment from your MQL5 account balance.

    Do not worry about changes in subscription prices. If the price grows, auto-renewal will be canceled. You will receive a relevant notification by email.

    You can enable or disable the auto renewal option at any moment via the My Subscriptions section at MQL5.com.


    Manage auto renewals from the My Subscriptions section at MQL5.com


  29. Signals: Fixed display of the Signals showcase. Now the system correctly identifies the compatibility of signals with the current account.
  30. Market: Added product search by the author's name and login in the Market showcase. Previously, the service only supported search by product name and description.
  31. VPS: Improved the auto subscription renewal option.

    Previously, the payment for the renewal could only be made from the MQL5 account balance. The user had to make sure the relevant amount is available on their account.

    Now there is no need to top up the MQL5 account. The system will renew the subscription using the same payment method which you used for the initial subscription. If you paid for the VPS with a card and enabled the auto renewal option, the system will use the same payment method for the new subscription period. If the payment fails, the system will try to make a payment from your MQL5 account balance.


    Use cards and other payment methods for auto renewal


    With the new option, you can be sure that your Expert Advisors and signal subscriptions will not stop due to the end of the VPS period. Furthermore, there is no need to check and top up your balance manually.
    The option will only be used for new subscriptions. Payments for the renewal of existing subscriptions will be made from the MQL5 account balance.
  32. Tester: Fixed visual testing errors. Under certain conditions, charts could fail to display indicators used in Expert Advisors.
  33. MetaEditor: Fixed jumping to the function or variable declaration using Alt+G. The action could fail if the declaration was below the call line.
  34. MetaEditor: Added display of the object type for references to class objects in the debugger.
  35. MetaEditor: Added capability to display union in the list of watched expressions.
  36. Fixed errors reported in crash logs.

MetaTrader 5 iPhone/iPad, MetaTrader 5 Android

  1. Added display of a disclaimer during application start. Please read it carefully. Additionally, some brokers can automatically create a demo account during the first start of the application. In this case, you will see the relevant terms.


    Disclaimers added in MetaTrader 5 for iPhone/iPad

  2. Added capability to connect an account to monitoring in the Signals service directly from the mobile application. This can be done by selecting "Account Monitoring" from the menu. For convenience, the account number and the broker name are automatically added to the registration window. You should additionally specify the signal name and an investor password.

    Connect your account to the monitoring to access advanced trading statistics, to share the results with other traders or to start selling your signals.

  3. Added support for Huawei AppGallery and HMS Services for mobile terminals running on Android OS. Huawei smartphone owners can install the app from the relevant store and use push notifications.

The update will be available through the Live Update system.


 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 platform build 3090: Improvements and fixes

MetaQuotes, 2021.10.20 16:52

The MetaTrader 5 platform update will be released on Thursday, October 21, 2021. The update provides improvements and fixes based on the feedback we have received after the previous MetaTrader 5 build 3081 release:

  1. Terminal: Fixed an error which could cause custom trading symbols to disappear under certain conditions.
  2. Terminal: Improved menu and toolbar icons.
  3. Terminal: Three new languages have been added to MQL5.com: French, Italian and Turkish.

    Now the largest community of algorithmic traders MQL5.community is available in 11 languages. We have already localized the website interface, documentation and important forum topics. Articles and Economic Calendar in the new languages will also become available soon.

  4. MQL5: Fixed bugs in the StringConcatenate function.
  5. MQL5: Fixed setting of the _LastError value when working with the FileSave function. The variable could contain a null value instead of the description of the function error under certain conditions.
  6. MQL5: Fixed data import from resources to double type arrays.
  7. MetaTester: Fixed an error which caused the chart window to freeze during visual testing.
  8. Fixed errors reported in crash logs.

The update will be available through the Live Update system.


 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 platform build 3091: Improvements

MetaQuotes, 2021.10.22 12:28

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

  1. Terminal: Fixed opening of an empty page when purchasing MQL5 services. Now operation results are immediately displayed to the user.
  2. Terminal: Fixed excessive compression of document images which users upload when requesting real accounts. This has improved the quality of automatic KYC checks and has facilitated the entire account opening procedure.
  3. Terminal: Fixed operation of graphs which are opened upon testing completion.
  4. MQL5: Added support for SQLite 3.36.0.
  5. MetaEditor: Added background highlighting for matching brackets. The option can be enabled via MetaEditor's general settings.
  6. MetaEditor: Improved MQL5 program debugger.
  7. Fixed errors reported in crash logs.

The update will be available through the Live Update system.


 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 platform build 3180: Vectors and matrices in MQL5 and improved usability

MetaQuotes, 2022.01.20 17:18

The MetaTrader 5 platform update will be released on Friday, January 28, 2022.

The new version features improved platform usability: smart activation of volumes on charts so that traders do not miss this data when analyzing markets, the ability to quickly place orders from the account history and improved chart printing functions.

Besides, we continue developing the functions for working with vectors and matrices in MQL5. More than 30 new methods are ready for use at the moment.

New MetaTrader 5 platform build 3180: Vectors and matrices in MQL5 and improved usability

In addition, we have implemented multiple fixes and improvements in all platform components.

These changes along with other new features of the updated MetaTrader 5 platform version are described in detail below.


  1. Terminal: Added chart window activation when moving a Market Watch symbol or a trading operation from account history to it.

    Both of these actions change the chart financial instrument to the selected one. Previously, they did not let the chart window become active. Accordingly, some further actions, such as calling a trading dialog (F9) or changing the scale (+/-) using hotkeys, could erroneously be applied to another chart. Now the chart, whose symbol has been changed by dragging, becomes selected for further work right away.

  2. Terminal: Added opening a new order window when double-clicking on a trade operation in the account history. A financial instrument from the operation a user has clicked on is immediately inserted into the dialog allowing for faster trading. A similar command has been added to the context menu.


    Set new orders faster by double-clicking from history


  3. Terminal: Added smart inclusion of real or tick volumes when opening new charts. This data is important when analyzing the market. However, not all traders are aware of its availability in the platform.

    Real trading volumes have a higher priority. If they are provided by a broker, their display is enabled on the chart. Otherwise, the display of tick volumes is enabled.

    The mechanism is used only if the chart is opened with the default.tpl template. Volumes are no longer enabled when reopening a chart if a user has manually disabled them in the chart settings. Custom templates are not affected.

  4. Terminal: Optimized and greatly accelerated the user interface display.
  5. Terminal: Improved the chart printing function called via the File menu:

    • Fixed saving print settings
    • Improved the printed page appearance: increased grid lines, removed the program name, updated the header font
    • Enlarged the print dialog for correct interface display

  6. Terminal: Fixed the volume field operation in the fast trading panel of the chart. Before the fix, the value was reset to the previous one after entering a new value and pressing Tab.
  7. Terminal: Fixed trading history display on the chart. Previously, operations of the previous account were not removed from charts when switching between accounts.
  8. Terminal: Fixed paying for MQL5.com via PayPal.
  9. Terminal: Fixed the platform freeze when displaying an option volatility chart.
  10. Terminal: Fixed phone number verification in the real account registration window. In some cases, the platform did not allow a user to proceed to the next registration stage after a correct number was entered.
  11. Terminal: Fixed checking the rights when joining a group chat with MQL5.com members. Previously, a newly joined user could only read messages without being able to write them.
  12. Terminal: Changed the chart text in case of data absence. Now "Waiting for update" is replaced with a symbol name, timeframe and symbol.
  13. Terminal: Improved support for negative prices added in build 2450. Zero values can now also be displayed for the appropriate Market Watch symbols.
  14. Terminal: Fixed display of product logos in the Market when working under Wine.
  15. MQL5: We continue adding vector and matrix support. The new functions significantly expand the possibilities for neural network-based solution developers.

    Multiple functions are currently ready for use:

    • Eye — construct a matrix with ones on a specified diagonal and zeros elsewhere.
    • Identity — construct a matrix having a specified size with ones on the main diagonal and zeros elsewhere.
    • Ones — construct a matrix having a specified size filled with ones.
    • Zeroes — construct a matrix having a specified size filled with zeros.
    • Full — construct a matrix having a specified size filled with specified values.
    • Copy — construct a copy of a matrix or vector.
    • Diag — extract a diagonal from a matrix and fill in the specified diagonal with values from a vector.
    • Tri — construct a matrix with ones on a specified diagonal and below, and zeros elsewhere.
    • Row — return a matrix row as a vector and fill in the specified row with values from the vector.
    • Col — return a matrix column as a vector and fill in the specified column with values from the vector.
    • Rows — return the number of rows in a matrix.
    • Cols — return the number of columns in a matrix.
    • Transpose — transpose a matrix.
    • * — product of matrices, vectors and scalars — dot product.
    • Power — raise a matrix to a power.
    • Kron — Kronecker product.
    • Cholesky — Cholesky decomposition.
    • QR — QR factorization of a matrix.
    • SVD — singular decomposition.
    • LU — LU decomposition of a matrix.
    • LUP — LUP decomposition of a matrix.
    • Norm — calculate matrix norm.
    • Cond — compute the condition number of a matrix.
    • Spectrum — compute spectrum of a matrix
    • Det — compute the determinant of a matrix.
    • Rank — compute matrix rank.
    • SLogDet — compute the sign and base logarithm of the determinant of a matrix.
    • Trace — compute matrix trace.
    • Solve — solve a system of linear equations.
    • LstSq — solve a system of linear equations using the least squares method.
    • Inv — compute the inverse of a matrix.
    • PInv — compute the pseudo-inverse of a matrix by the Moore-Penrose method.
    • Compare — compare two matrices using epsilon.

    For more details please read the relevant MQL5 documentation.

  16. MQL5: Fixed errors when handling files and databases related to path length limitation. In particular, the DatabaseOpen function allowed setting the path larger than the acceptable one causing incorrect database creation. Now the function returns the ERR_TOO_LONG_FILE_NAME error code correctly.
  17. MQL5: Fixed variable constancy control. Previously, the compiler could occasionally skip the "constant variable cannot be passed as reference" error.
  18. MQL5: Fixed erroneous compiler warnings about using an uninitialized variable.
  19. MQL5: Fixed ChartWindowOnDropped function operation for indicators. Previously, it always returned zero.
  20. MQL5: Added support for Python 3.10 to the Python integration module.
  21. VPS: Fixed displaying the VPS item in the Navigator. Previously, it could occasionally disappear when switching between accounts.
  22. MetaEditor: Fixed unwrapping of complex expressions in the debug observation window.
  23. Tester: Fixed export of test reports to files. Some values could be rounded incorrectly if a currency with a precision of 0 decimal places was used as a deposit currency. For example, JPY.
  24. Fixed errors reported in crash logs.

The update will be available through the Live Update system.


 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 platform build 3210: Revised Sharpe Ratio calculation algorithm, new matrix methods and control over indicator minimum/maximum values

MetaQuotes, 2022.02.10 16:30

The MetaTrader 5 platform update will be released on Friday, February the 11th, 2022.

The update provides the revised Sharpe Ratio calculation algorithm based on a traditional formula, new matrix methods, optimized memory consumption, and improved network system operation for better data transfer.

We have also added two new properties, INDICATOR_FIXED_MINIMUM and INDICATOR_FIXED_MAXIMUM, in the ENUM_CUSTOMIND_PROPERTY_INTEGER enumeration, which fix/unfix minimum and maximum indicator values using the IndicatorSetDouble function.


In addition, we have fixed some errors in the Math\Stat\Math.mqh mathematical library and corrected the operation of the CopyTicks and CopyTicksRange functions, which could return outdated data when crossing over midnight.

These changes, along with other new features of the updated MetaTrader 5 platform version, are described in detail below:


  1. MQL5: Added Min, Max, ArgMin, ArgMax and Sum functions for vectors and matrices. Use the functions to find the minimum and the maximum values, relevant indexes and the sum.
  2. MQL5: Added support for Flat methods for the matrix. With these methods, a matrix element can be addressed through one index instead of two.
    double matrix::Flat(ulong index) const;      // getter
    void matrix::Flat(ulong index,double value); // setter

    Pseudocode for calculating the address of a matrix element:

    ulong row=index / mat.Cols();
    ulong col=index % mat.Cols();
    
    mat[row,col]

    For example, for 'matrix mat(3,3)', access to elements can be written as follows:

      reading: 'x=mat.Flat(4)', which is equivalent to 'x=mat[1][1]'
      writing: 'mat.Flat(5, 42)', equivalent to 'mat[1][2]=42'

    If the function is called with an invalid matrix index, the OutOfRange critical execution error will be thrown.

  3. MQL5: Improved formatting of floating-point numbers in MQL5-program input parameters. When reading some real numbers, numbers with many zeros were substituted into the input parameters, for example, 0.4 was represented as 0.400000000002.
  4. MQL5: Fixed errors in the Math\Stat\Math.mqh math library. The MathSample function from this library has been revised to match the traditional behavior of similar math libraries when sampling with backtracking.
  5. MQL5: Fixed CopyTicks/CopyTicksRange error which could cause the return of outdated data when crossing over the midnight, when no ticks are provided for the financial instrument.
  6. MQL5: Added new INDICATOR_FIXED_MINIMUM and INDICATOR_FIXED_MAXIMUM values into the ENUM_CUSTOMIND_PROPERTY_INTEGER enumeration.
    Using these properties, you can fix or unfix the minimum and maximum indicator values using the IndicatorSetInteger function. When calling IndicatorSetInteger(INDICATOR_FIXED_MINIMUM/INDICATOR_FIXED_MAXIMUM, true), the current minimum or maximum value is used.





  7. Tester: Revised Sharpe Ratio calculation algorithm to match the traditional formula, in which the value corresponds to a one-year interval. The previous algorithm was based on the variability of obtained PnL and it ignored equity fluctuations against open positions. Now the calculation includes equity movements, while the Sharpe ratio is interpreted in a classical way:
    • Sharpe Ratio < 0              The strategy is unprofitable and is not suitable. Bad.
    • 0 < Sharpe Ratio  < 1.0    The risk does not pay off. Such strategies can be considered when there are no alternatives. Indefinite.
    • Sharpe Ratio ≥ 1.0          This can mean that the risk pays off and that the portfolio/strategy can show results. Good.
    • Sharpe Ratio ≥ 3.0          A high value indicates that the probability of obtaining a loss in each particular deal is very low. Very good.

  8. Terminal: Optimized memory consumption by the terminal.
  9. Terminal: Improved platform operation with a network subsystem to enhance performance and to reduce network delays.
  10. Terminal: Removed the display of the zero grid level in indicators when grid rendering is disabled.


The update will be available through the Live Update system.


 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform build 3260: Bulk operations, matrix and vector functions, and chat enhancements

MetaQuotes, 2022.03.31 13:59

The MetaTrader 5 platform update will be released on Friday, April 15, 2022.

In the new version, we have added a set of commands for bulk position closing and pending order cancellation operations. Now, the relevant actions can be executed with a couple of mouse clicks.

We have also expanded the capabilities of the MQL5 language. The update provides new matrix and vector functions, as well as built-in array and string methods.

New MetaTrader 5 Platform build 3260: Bulk operations, matrix and vector functions, and chat enhancements

Furthermore, we have improved built-in chats. Now, chats support citing and combined messages containing text, images and attachments.

In addition, we have implemented multiple fixes and improvements in MQL5 service purchasing processes and have optimized the terminal graphics system.

These changes, along with other new features of the updated MetaTrader 5 platform version, are described in detail below:

  1. Terminal: Added commands for bulk closing of positions and cancellation of pending orders.

    New "Bulk Operations" command has been added to the context menu of the Trade tab. The list of available commands is formed automatically, depending on the selected operation and on your account type.


    Bulk position closing and order deletion


    The following commands are always available in the menu:

    • Closing all positions On hedging accounts, the system tries to close positions by opposite ones (Close By), and then it closes the remaining positions following a regular procedure.
    • Close all profitable or all losing positions
    • Delete all pending orders
    • Delete pending orders of certain types: Limit, Stop, Stop Limit

    If you select a position, additional commands appear in the menu:

    • Close all positions for the symbol
    • Close all positions in the same direction (on hedging accounts)
    • Close opposite positions for the same symbol (on hedging accounts)
    • Position reversal (on netting accounts)

    If you select a pending order, additional commands appear in the menu:

    • Delete all pending orders for the same symbol
    • Delete all pending orders of the same type for the same symbol

    These commands are only available if One Click Trading is enabled in platform settings: Tools \ Options \ Trade.
  2. Terminal: Enhanced internal chart features:

    • Added ability to reply to messages. The source message text will be cited in the reply.
    • Added ability to create messages with different content types, such as images with text and text with attachments, among others.
    • Fixed display of the separator between read and unread messages.
    • Error fixes and stability improvements.


    Reply feature in chats


  3. Terminal: Optimized and accelerated operation of the terminal's graphical system. Interface rendering will require less resources.
  4. Terminal: Fixed calculation of daily price changes for futures. If the broker provides a clearing price, this price will be used for calculations.
    ((Last - Clearing Price)/Clearing Price)*100
    A detailed description of all calculation types is available in the Documentation.

  5. Terminal: Fixed errors during MQL5 service purchases:

    • Payment systems could return errors for successful operations under certain conditions.
    • An incorrect price could be displayed at intermediary product renting steps in the Market.

  6. Terminal: Fixed operation of the "Start" button in the purchased/downloaded Market product page. Now the button correctly launches the application on the first open chart.
  7. Terminal: Fixed accounting for certain deal types when generating the history of positions.
  8. MQL5: Added new functions for working with matrices and vectors:

    • Median — returns the median of the matrix or vector elements
    • Quantile — returns the q-th quantile of matrix/vector elements or elements along the specified axis
    • Percentile — returns the q-th percentile of matrix/vector elements or elements along the specified axis
    • Std — computes the standard deviation of matrix or vector elements
    • Var — computes the variance of matrix or vector elements
    • CorrCoef — computes the matrix/vector correlation coefficient
    • Correlate — computes the cross-correlation of two vectors
    • Convolve — returns the discrete, linear convolution of two vectors
    • Cov — computes the covariance matrix

  9. MQL5: We have started adding built-in methods for numeric arrays. The new methods enhance usability, increase code compactness, and improve code compatibility with other languages.

    The following three methods are already available:

    • ArgSort — sorts arrays by the specified dimension; the last one is used by default (axis=-1).
    • Range — returns the number of elements in the specified array dimension. Analogue of ArrayRange.
    • Size — returns the number of array elements. Analogue of ArraySize.

    Example:
    void OnStart()
      {
       int arr[4][5]=
         {
            {22, 34, 11, 20,  1},
            {10, 36,  2, 12,  5},
            {33, 37, 25, 13,  4},
            {14,  9, 26, 21, 59}
         };
       ulong indexes[4][5];
    //--- Sort the array
       arr.ArgSort(indexes,-1,0);
       Print("indexes");  
       ArrayPrint(indexes);
      }
    
    // Result log:
    // indexes
    //     [,0][,1][,2][,3][,4]
    // [0,]   4   2   3   0   1
    // [1,]   2   4   0   3   1
    // [2,]   4   3   2   0   1
    // [3,]   1   0   3   2   4

  10. MQL5: We have started adding built-in methods for strings.

    The following methods are currently available:

    • BufferSize — returns buffer size allocated for the string.
    • Compare — compares two strings and returns the comparison result as an integer.
    • Length — returns the number of characters in a string.
    • Find — searches for a substring in a string.
    • Upper — capitalizes a string.
    • Lower — converts a string to lowercase.
    • Replace — replaces a substring.
    • Reserve — reserves a buffer for a string.

    All methods are analogous to string functions.

      Example:
      void OnStart()
        {
         string test="some string";
         PrintFormat("String length is %d",test.Length());
        }
      
      // Result log:
      // String length is 11
    • MQL5: Added SYMBOL_SUBSCRIPTION_DELAY value into the ENUM_SYMBOL_INFO_INTEGER enumeration for the delay in quotes delivery for specific symbols.

      It is only used for subscription-based trading symbols. The delay is usually applicable to data provided in trial mode.

      The property can only be requested for symbols selected in the Market Watch. Otherwise, the ERR_MARKET_NOT_SELECTED (4302) error will be returned.

    • MQL5: Added ACCOUNT_HEDGE_ALLOWED property into the ENUM_ACCOUNT_INFO_INTEGER enumeration — enables the opening of opposite positions and pending orders. The property is only used for hedging accounts to comply with specific regulatory requirements, according to which an account cannot have opposite positions for the same symbol, while same-direction positions are allowed.

      If this option is disabled, accounts are not allowed to have opposite-direction positions and orders for the same financial instrument. For example, if the account has a Buy position, the user cannot open a Sell position or place a pending Sell order. If the user tries to perform such an operation, the TRADE_RETCODE_HEDGE_PROHIBITED error will be returned.

    • MQL5: New properties in the ENUM_SYMBOL_INFO_DOUBLE enumeration:

      • SYMBOL_SWAP_SUNDAY
      • SYMBOL_SWAP_MONDAY
      • SYMBOL_SWAP_TUESDAY
      • SYMBOL_SWAP_WEDNESDAY
      • SYMBOL_SWAP_THURSDAY
      • SYMBOL_SWAP_FRIDAY
      • SYMBOL_SWAP_SATURDAY

      Use the values to obtain swap calculation rates for specific days of the week. 1 — single swap, 3 — triple swap, 0 — no swap.

    • MQL5: Fixed operation of CopyTicks and CopyTicksRange functions. An error could cause the return of outdated data when crossing through midnight. The error occurred when no ticks were provided for the financial instrument.
    • Fixed errors reported in crash logs.

    The update will be available through the Live Update system.


     

    Forum on trading, automated trading systems and testing trading strategies

    New version of MetaTrader 5 build 3270: Improvements and fixes

    MetaQuotes, 2022.04.20 17:17

    The MetaTrader 5 platform update will be released on Thursday, April 21, 2022. The update provides improvements and fixes based on the feedback we have received after the previous MetaTrader 5 build 3260 release, which included many new features.

    New version of MetaTrader 5 build 3270: Improvements and fixes


    The update provides the following changes:

    1. Terminal: Built-in chat improvements.

      • Updated design. Messages now appear without encircling bubbles to optimize display and space utilization. Added avatars and date separators.
      • Copy and Delete commands have been added to the message menu.
      • Bug fixes and stability improvements.


      Built-in chat improvements


    2. Terminal: Fixed bulk position closing commands. An error occurred on accounts with the hedging position accounting system.
    3. Terminal: Fixed accounting for certain deal types when generating the history of positions.
    4. Fixed errors reported in crash logs.


    The update will be available through the Live Update system.


     

    Forum on trading, automated trading systems and testing trading strategies

    MetaTrader 5 Platform update build 3280: Improvements and fixes based on traders' feedback

    MetaQuotes, 2022.04.29 11:10

    The MetaTrader 5 platform update will be released on Friday, April 29, 2022. The update provides improvements and fixes based on the feedback we have received after the release of build 3270.

    MetaTrader 5 build 3280: Improvements and fixes based on feedback from traders

    The update includes the following changes:

    1. Terminal: Fixed filling of standard Trailing Stop levels in the context menu of open orders and positions.



      Trailing Stop levels in the context menu

    2. Terminal: Updated user interface translations.
    3. Fixed errors reported in crash logs.


    The update will be available through the Live Update system.


     

    Forum on trading, automated trading systems and testing trading strategies

    New MetaTrader 5 Platform build 3300: Fast compilation and improved code navigation in MetaEditor

    MetaQuotes, 2022.05.19 17:32

    The MetaTrader 5 platform update will be released on Friday, May 20, 2022.

    In the new version, we have implemented multiple improvements to MetaEditor. Compilation now supports two modes: slow compilation with code optimization and fast one without optimization. The latter option can be useful for fast code validations during development.

    Other code editor improvements include a new command for jumping to method declarations and the auto-substitution option on the "Tab" key.

     New MetaTrader 5 Platform build 3300: Fast compilation and improved code navigation in MetaEditor

    In addition, we have facilitated MQL5 debugging processes by automatically displaying local variables in the watch list.

    These changes, along with other new features of the updated MetaTrader 5 platform version, are described in detail below:


    1. Terminal: Added ability to resize the Rectangle graphical object by dragging any of its four corners.


      Modify the rectangle by dragging any of its corners


    2. Terminal: Faster GUI rendering.
    3. Terminal: Improved support for IPv6 addresses.
    4. Terminal: Fixed height calculation for the lower date field and width calculation for the right-hand side price field on the first platform launch.
    5. MQL5: Added function for working with matrices and vectors —  RegressionMetric. It sets the metric for regression evaluation.
       double vector.RegressionError(const enum lr_error);
       double matrix.RegressionError(const enum lr_error);
       vector matrix.RegressionError(const enum lr_error,const int axis);
      The following variables can be used as metrics:
      enum REGRESSION_ERROR
        {
         REGRESSION_MAE,     // Mean absolute error
         REGRESSION_MSE,     // Mean square error
         REGRESSION_RMSE,    // Root mean square error
         REGRESSION_R2,      // R squared
         REGRESSION_MAPE,    // Mean absolute percentage error
         REGRESSION_MSPE,    // Mean square percentage error
         REGRESSION_RMSLE    // Root mean square logarithmic error
        };
    6. MQL5: Added ability to write arrays with data size greater than INT_MAX (arrays of structures).
    7. MetaEditor: Tab bar improvements:

      • The panel is not hidden even if only one window is open. Thus, the tab context menu commands are always visible to the user.
      • The 'X' closing button has been added to each tab. In addition, tabs can be closed using the middle mouse button or via the context menu.

      Tab bar improvements


    8. MetaEditor: Added command for quick program compilation. This mode skips code optimization, which significantly speeds up the creation of an EX5 executable file. Use this mode during the active development stage, when you need to quickly check the written code. During the final program compilation, turn on the maximum optimization mode for enhanced performance.


      Use unoptimized compilation for quick code verification


      The "Maximum optimization" parameter in the project settings performs the same function.

      All compilation-relation operations are available under the "Build" menu.

    9. MetaEditor: Code management improvements:

      • Separate commands have been implemented for jumping to definitions and to declarations. Previously, the menu had one command which opened a selection sub-menu. The new commands enable faster switch to necessary code parts.
      • Added substitution of recognized keywords by the "Tab" key, in addition to "Enter".


      Jump to method declaration


    10. MetaEditor: Added ability to automatically display local variables in the debugger watch list. The display can be enabled by the "Local" context menu command. As the debugger operation proceeds through the code, variables from the current scope are automatically displayed in the list.


      Display of local variables in the Watch List

    11. MetaEditor: Debugger watch list improvements for vectors and matrices.
    12. MetaEditor: Fixed paths in project files. An error could cause files to disappear from projects.
    13. Tester: Improved stopping of tester agents at platform shutdown.
    14. Tester: The fifth MQL5 Cloud Network node has been added. It is located in Hong Kong. The new node speeds up the optimization of robots via the network in the nearest regions.
    15. Fixed errors reported in crash logs.


    The update will be available through the Live Update system.


     

    Forum on trading, automated trading systems and testing trading strategies

    MetaTrader 5 Platform update build 3320: Improvements and fixes

    MetaQuotes, 2022.05.26 16:11

    The MetaTrader 5 platform update will be released on Thursday, June 2, 2022. The update provides improvements and fixes based on the feedback we have received after the previous MetaTrader 5 build 3300 release, which included many new features.


    MetaTrader 5 Platform update build 3320: Improvements and fixes

    These new features, along with other changes, are described in detail below.

    1. Terminal: Extended tooltips for trade objects displayed on charts:

      • Market exit deals now display profits.
      • The relevant indication is displayed for deals executed as a result of Take Profit or Stop Loss activation.

      Similar tooltips are available for the lines joining entry and exit trades.



      Extended tooltips for deal objects


    2. Terminal: Improved graphical system performance.
    3. Terminal: Added logging of bulk operations with open orders and positions. When such a command is executed, a relevant log as added to the Journal, for example: "bulk closing of XXX positions started".
    4. Terminal: Fixed bulk closing of opposite positions.
    5. Terminal: Fixed updating of on-chart objects displaying trading history. The error occurred when changing the chart symbol.
    6. MQL5: Works on matrix and vector functions are underway: support for 'float' and 'complex' is being implemented.
    7. MQL5: Operator "!" (LNOT) for a pointer checks its validity via an implicit CheckPointer call. Operator "==" should be used for a quick NULL check. For example: ptr==NULL or ptr!=NULL.
    8. MetaTester: Fixed display of deal objects on testing graphs.
    9. MetaTester: Improved graphical system performance.
    10. MetaEditor: Updated UI translations.
    11. Fixed errors reported in crash logs.

    The update will be available through the Live Update system.


    Reason: