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

 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform build 2265: DirectX functions for 3D visualization in MQL5 and symbol settings in Strategy Tester

MetaQuotes Software Corp., 2019.11.29 13:41

The MetaTrader 5 platform update will be released on Friday, December the 6th, 2019. The new version features the following changes:


  1. Terminal: More columns have become available in Market Watch. The main section now features 40 additional symbol parameters, which were previously available only under the Details tab.




  2. Terminal: Added highlighting of the currently connected account and the current server in the Navigator. The function will be useful if you have multiple accounts with different brokers.




  3. Terminal: Updated frame design for charts. Frames have become smaller and thus more space is now available for useful information.




  4. Terminal: Modified algorithm for calculating trading totals when displaying the trading history as positions. The values are now calculated based on actual records.

    To display the trading history as positions, the terminal uses information about deals executed during the requested period. Only the positions closed within this period will be shown in history. If the position is still open or its close time does not fall within the selected interval, it will not be displayed in the history. Therefore, the total profit and commission in the 'positions' mode can differ from those in the 'orders/deals' history mode.

    For example, you are viewing the past week history. During this period, 100 deals were executed, 98 of which participated in the opening and closing of 20 positions. The last two deals opened new positions, which have not been closed up to now. In this case, the history of deals contains 100 records and appropriate total values calculated based on these deals. When viewing the history as positions, you will see 20 records collected based on 98 deals. Only this data will be taken into account when calculating total values. If the broker charges entry deal fees, the final commission value in the deals history will differ from the commissions shown in the positions history, because the two last deals will be ignored in the latter case.

  5. Terminal: Implemented faster launching of MQL5 programs.
  6. Terminal: New /beta key has been added for the terminal installation file, which allows downloading the beta version. In normal mode, the release version should be installed first, which can then be updated till a beta version. By skipping this step, you can save time and traffic. Installation start example:
    C:\mt5setup.exe /beta
  7. Terminal: Fixed display of margin requirements for instruments with the "Exchange Stocks" type.
  8. Terminal: Accelerated operation of all platform components through the use of the Clang/LLVM compiler. In some cases compilation is 20% faster.
  9. MQL5: Added new DirectX 11 functions and shaders for 3D visualization. Now powerful three-dimensional graphics can be created directly in MQL5.

    The new CCanvas3D class is an extension of the CCanvas custom graphics class. It is available in the \MQL5\Include\Canvas\ directory. The class features functions for rendering three-dimensional objects via DirectX API.

    • Create — creates a scene.
    • Attach — binds a scene to a chart.
    • Destroy — destroys a scene.
    • ObjectAdd — adds to the scene a descendant object inherited from the base CDXObject class.
    • Render — the full render loop, with buffer clearing and rendering of all CDXObject, added via the ObjectAdd method.
    • RenderBegin — starts scene rendering, fills the render buffer with the specified color (if DX_CLEAR_COLOR flag is set) and the depth buffers (when using DX_CLEAR_DEPTH), as well as sets the DXInputScene scene buffer for default shaders.
    • RenderEnd — completes scene rendering and receives a result to an internal buffer. If redraw==true, displays the image on the chart, on which it is running.
    • ViewMatrixGet — receives a view matrix.
    • ViewMatrixSet — sets a view matrix. The matrix is not compatible with ViewPositionSet, ViewRotationSet, ViewTargetSet and ViewUpDirectionsSet methods.
    • ViewPositionSet — sets camera position.
    • ViewRotationSet — sets camera rotation matrix.
    • ViewTargetSet — sets the point the camera is pointing at. Together with ViewUpDirectionsSet, it is an alternative to ViewRotationSet.
    • ViewUpDirectionsSet — sets the vertical position of the camera. Together with ViewTargetSet, it is an alternative to ViewRotationSet.
    • ProjectionMatrixGet — receives a projection matrix.
    • ProjectionMatrixSet — sets a projection matrix.

    Detailed documentation for the new library will be published soon.




  10. MQL5: Added support for operations with SQLite databases directly from MQL5. This enables easy execution of SQL queries without creating complex instructions. The internal operation is implemented by the new standard library extension.

    The following functions are available:

    • DatabaseOpen — opens or creates a database in the specified file
    • DatabaseClose — closes a database
    • DatabaseTableExists — checks if there is a table in the database
    • DatabaseExecute — executes a query to the specified database
    • DatabasePrepare — creates a query handle, which can be further executed using DatabaseRead()
    • DatabaseRead — jumps to the next record in the query result
    • DatabaseFinalize — deletes a query which was created in DatabasePrepare()
    • DatabaseTransactionBegin — starts the execution of a transaction
    • DatabaseTransactionCommit — completes the execution of a transaction
    • DatabaseTransactionRollback — rolls back a transaction
    • DatabaseColumnsCount — receives the number of fields in a query
    • DatabaseColumnName — receives field name by number
    • DatabaseColumnType — receives field type by number
    • DatabaseColumnSize — receives field size in bytes
    • DatabaseColumnText — receives a string value of a field from the current record
    • DatabaseColumnInteger —  receives an int value from the current record
    • DatabaseColumnLong — receives a long value from the current record
    • DatabaseColumnDouble — receives a double value from the current record
    • DatabaseColumnBlob — receives an array of field values from the current record

    The following error codes have been added for function operations:

    • ERR_MQL_DATABASE_INTERNAL (5120) — internal database error
    • ERR_MQL_DATABASE_INVALID_HANDLE (5121) — invalid database handle
    • ERR_MQL_DATABASE_TOO_MANY_OBJECTS (5122) — maximum number of Database objects exceeded
    • ERR_MQL_DATABASE_CONNECT (5123) — database connection error
    • ERR_MQL_DATABASE_EXECUTE (5124) — request execution error
    • ERR_MQL_DATABASE_PREPARE (5125) — request creation error
    • ERR_MQL_DATABASE_NO_MORE_DATA (5126) — no more data to read
    • ERR_MQL_DATABASE_STEP (5127) — error moving to the next query record
    • ERR_MQL_DATABASE_NOT_READY (5128) — data to read query results is not yet ready
    • ERR_MQL_DATABASE_BIND_PARAMETERS (5129) — SQL query auto-substitution error

  11. MQL5: Added new property of MQL5 programs, which enables the selection of a default visualization method.
    #property optimization_chart_mode "3d,InpX,InpY"
    The property allows setting the type of chart which opens at the end of optimization, as well as program parameters for the X and Y axes.

    The property only sets the default chart view. It can be changed manually at any time, using the context menu.

  12. MQL5: New MathArctan2 function. Returns the radian value of the angle, the tangent of which is equal to the ratio of the two specified numbers.
    double  MathArctan2(
       double  y      // the y coordinate of the point
       double  x      // the x coordinate of the point
       );
  13. MQL5: We have performed the general optimization of programs to improve performance and reduce resource consumption.
  14. MQL5: Added examples of math calculations which can be performed in the strategy tester. They are available under the \MQL5\Experts\Examples\Math 3D\ directory.
  15. MQL5: Introduced tighter control of namespaces.
  16. MQL5: Added loading of linked libraries when using .NET libraries in MQL5 programs. If the used .NET library requires other libraries for operation, the compiler will try to download required libraries automatically from \MQL5\Libraries.
  17. MQL5: Fixed time operations in the MetaTrader module for Python integration. Now all output data use the time of the trading server to which the terminal is connected.
  18. Tester: A plethora of new features and improvements:


    Custom settings for financial instruments
    Now you can change settings of the main trading instrument, for which testing/optimization is performed. Almost all specification parameters can be overwritten: volumes, trading modes, margin requirements, execution mode and other settings. Thus, if you need to check an Expert Advisor under different conditions, there is no need to create a separate custom symbol and download its history. This can be done by changing standard symbol settings.



    If the symbol specification is customized, the gear icon and the symbol icon are marked with an asterisk. This shows that custom parameters are used for the current test.




    Last settings/Expert Advisors/charts
    Use the new context menu commands for fast testing or optimization setup. Choose the last used tester settings, recent charts or applications:




  19. MetaEditor: Added ability to work with C/C++ and Python projects directly from MetaEditor. Now, multi-lingual projects can be managed using the built-in editor.

    If appropriate compilers are installed on your PC, MetaEditor will detect them and add to settings. Optionally, you can specify paths to required components under the Compilers tab. From the same tab, you can download the components by clicking Install next to the appropriate field.




    After that you can work with C/C++ and Python projects similarly to MQL5 programs.

  20. MetaEditor: Added support for sub-projects inside the Shared Projects directory intended for shared project development via MQL5 Storage. Previously, only single projects could be created at the top level.
  21. MetaEditor: Built-in debugger updates.
  22. MetaEditor: Fixed addition of a function header when using a code styler.
  23. MetaEditor: 'Jump to previous/next cursor position' commands are now available not only in the View menu, but also on the toolbar.
  24. MetaEditor: Spaces can now be used in project names.
  25. Android: Added ability to quickly switch to deposit/withdrawal pages on the broker website.

    There is no need to search for appropriate functions in a trader's room on the broker site. Fast navigation commands are available directly in terminals: users can switch to deposit and withdrawal pages from the Accounts and Trading sections:



    • Deposit/withdrawal operations are only available if appropriate functions are enabled for the trading account on the broker side.
    • The trading terminal does not perform any account deposit/withdrawal operations. The integrated functions redirect the user to the appropriate broker website pages.

  26. Android: Positions in history are sorted now by closing date.
  27. Android: Added marking of positions closed by Stop Loss or Take Profit with red and green vertical lines in the history section.
  28. Android: Added new fields in the trading symbol specification:

    • Category — the property is used for additional marking of financial instruments. For example, this can be the market sector to which the symbol belongs: Agriculture, Oil & Gas and others. The category is displayed only if the appropriate information is provided by the broker.
    • Exchange — the name of the exchange in which the security is traded. The category is displayed only if the appropriate information is provided by the broker.

  29. Android: Added Margin Call state indication in the trading section. Upon the emergence of this state, Margin, Free Margin and Margin Level parameters will be shown in red.
  30. Android: Fixed display of the OTP section opening button in tablets.
  31. Android: Other fixes and improvements.
  32. iPhone/iPad: Added ability to quickly switch to deposit/withdrawal pages on the broker website. For further details, please see the What's New list of MetaTrader 5 for Android.



  33. iPhone/iPad: Added dark mode support for iOS/iPadOS.
  34. iPhone/iPad: The one-time password section has become available in the iPad version.
  35. iPhone/iPad: The positions closed by Stop Loss or Take Profit are marked with red and green vertical lines in the history section.
  36. iPhone/iPad: Positions in history are sorted now by closing date. If the position has not yet been closed, its opening date is used for sorting.
  37. iPhone/iPad: Other fixes and improvements.
  38. Fixes based on 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 2280

MetaQuotes, 2019.12.12 15:54

The MetaTrader 5 platform update will be released on Friday, December the 13th, 2019. The update features important additions and fixes based on the feedback we have received after the previous MetaTrader 5 build 2265 major update:

  1. Terminal: Fixed a bug which caused inability to delete an Expert Advisor from the chart having no data.
  2. Terminal: Fixed chart header display under Wine.
  3. MQL5: Improved loading and compilation speed of MQL5 programs.
  4. MQL5: A double click on a chart is now passed as a single-click event to an MQL5 program. Previously, such events were not handled.
  5. MQL5: Fixed StringTrimRight function operation.
  6. Tester: Fixed a bug which cased the testing symbol in settings to be empty. The error could result from switching between trading accounts with different sets of trading instruments. The new behavior: if the previously selected symbol is not found in the currently connected trading account, the first available symbol In Market Watch is automatically selected instead.
  7. MetaEditor: Fixed application icon loading when reopening project properties.
  8. Added documentation for DirectX 3D visualization functions.
  9. Updated user interface translations.
  10. Fixes based on crash logs.

The update will be available through the Live Update system.

We strongly recommend to install this update.

 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform Build 2340: Managing account settings in the Tester and expanded integration with Python

MetaQuotes, 2020.02.20 14:59

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

  1. MetaEditor: Added new functionality for working with SQLite databases.

    In the previous platform update, we introduced support for operations with SQLite databases directly from MQL5. The main functions have become available through the MetaEditor user interface:

    • Create and connect databases
    • View tables and perform quick data queries
    • Create and execute SQL queries and rollback changes

    How it works
    The quick database creation functionality is available from the MQL5 Wizard. You can easily create your first table and define its fields.




    Upon the database creation, you will be forwarded to a new Navigator section, which features commands for managing the data.

    Database tables are shown in the left-hand side window. Double-click on the table name to quickly query the first 1,000 records. In this navigator section, you can also create and open other databases, as well as work with tables.

    The database can be managed in the main editor window, in which you can fill in the table, search and select data, enter SQL queries and execute other operations:



    For further details about MetaTrader 5 operations with databases, please read the article entitled "SQLite: Native handling of SQL databases in MQL5".

  2. MetaEditor: Expanded support for multi-lingual projects. This update provides further expanded possibilities for working with Python scripts:

    • Now, such scripts can be created using the MQL5 Wizard, while you can instantly add required library dependencies in the code.
    • Special icons have been added in the navigator and the relevant syntax is available in the editor.
    • When running a script via MetaEditor, messages from the Python console (stdout, stderr) appear under the Errors section.




    Click "Compile" in the editor to run the script:





    To work with Python, do not forget to specify its path under the Settings \ Compilers section in MetaEditor. To enable the use of the MetaTrader 5 library, install it using the following command:
    pip install MetaTrader5
    For Python integration details please read the relevant documentation.

  3. MQL5: Completely revised Python integration. The update involves many new functions and new command naming.

    New naming
    The existing commands have been renamed as follows:
    MT5Initialize       -> initialize
    MT5Shutdown         -> shutdown
    MT5TerminalInfo     -> terminal_info
    MT5Version          -> version
    MT5CopyRatesFrom    -> copy_rates_from
    MT5CopyRatesFromPos -> copy_rates_from_pos
    MT5CopyRatesRange   -> copy_rates_range
    MT5CopyTicksFrom    -> copy_ticks_from
    MT5CopyTicksRange   -> copy_tick_range

    New commands
    The list of supported commands has been expanded. Added trading functions, as well as functions for working with the trading history and for receiving financial symbol and current account data.

    • account_info() receives information about the current account. An analogue of AccountInfoInteger , AcountIndoDouble and AccountInfoString.
    • positions_total() receives the number of open positions. An analogue of PositionsTotal.
    • positions_get(symbol, ticket) receives open positions by symbol or ticket.
    • orders_total() receives the number of orders. An analogue of OrdersTotal.
    • orders_get(symbol, ticket) receives open orders by symbol or ticket.
    • history_orders_total(from, to) receives the number of orders in the specified historical time frame.
    • history_orders_get(from, to, position, ticket) receives orders from the specified historical time frame, by ticket or as filtered by position.
    • history_deals_total() receives the number of deals in the history. An analogue of HistoryDealsTotal.
    • history_deals_get(from, to, position, ticket) receives deals from the specified historical time frame, by ticket or as filtered by position.
    • symbol_info(symbol) receives information about a financial instrument. An analogue of SymbolInfoInteger, SymbolInfoDouble, SymbolInfoString.
    • symbol_info_tick(symbol) receives the last tick by symbol. An analogue of SymbolInfoTick.
    • symbol_select(symbol, enable) enables/disables a symbol in Market Watch. An analogue of SymbolSelect.
    • order_check(request) checks order margin. An analogue of OrderCheck.
    • order_send(request) sends an order to the server. An analogue of OrderSend.
    • order_calc_margin(action, symbol, volume, price) calculates margin for an order. An analogue of OrderCalcMargin.
    • order_calc_profit(action, symbol, volume, price_open, price_close) calculates profit. An analogue of OrderCalcProfit.

    Running Python scripts on charts
    Python scripts can be run directly on platform charts, similarly to regular MQL5 programs. These scripts are marked with special icons in the Navigator.



    Script messages will be displayed under the "Toolbox \ Experts" section. If a MetaTrader 5 library is used in the script, it can receive trading symbol and account data, as well as perform trading operations.

    Python scripts can be executed on the same chart in parallel with other MQL5 scripts and Expert Advisors. To stop a script with a looped execution, remove it from the chart.

    Additional protection
    To enable additional account protection when using third-party Python libraries, you may activate the "Disable automated trading via external Python API" option in terminal settings.




    Python scripts can only perform trading operations when this option is disabled.

  4. MQL5: Significantly accelerated re-launch of MQL5 programs and re-creation of custom indicators from MQL5 programs. In some cases, operations are performed 100 times faster.
  5. MQL5: Added functions for working with databases:

    DatabaseImport
    Imports data from a file to a table.
    long  DatabaseImport(
       int           database,          // database handle received in DatabaseOpen
       const string  table,             // table name to insert data to
       const string  filename,          // file name to import data from
       uint          flags,             // combination of flags
       const string  separator,         // data separator
       ulong         skip_rows,         // number of first rows to skip
       const string  skip_comments      // string of characters, which define comments
       );

    DatabaseExport
    Exports a table or an SQL query result to a CSV file. The file is created in UTF-8 encoding.
    long  DatabaseExport( 
       int           database,           // database handle received in DatabaseOpen 
       const string  table_or_sql,       // table name or SQL query
       const string  filename,           // CSV file name for data export
       uint          flags,              // combination of flags
       const string  separator           // data separator in the CSV file
       );

    DatabasePrint
    Prints the table or SQL query result to the Experts journal.
    long  DatabasePrint(
       int           database,          // database handle received in DatabaseOpen
       const string  table_or_sql,      // table or SQL query
       uint          flags              // combination of flags
       );

  6. MQL5: Added FileSelectDialog function, which calls the system dialog creating/opening a file or a folder.
    int  FileSelectDialog(
       string   caption,              // window title
       string   initial_dir,          // initial directory
       string   filter,               // extension filter
       uint     flags,                // combination of flags
       string&  filenames[],          // array with file names
       string   default_filename      // default file name
       );
    The new function enables the efficient user interaction with the MQL5 program.

  7. MQL5: New DEAL_FEE value in the ENUM_DEAL_PROPERTY_DOUBLE enumeration. It is used for a deal fee. The value indicates a separate commission type charged by the broker.

  8. Tester: Added functionality to specify custom trading account settings during strategy testing, such as trading limitations, margin settings and commission. The new functions provide extended capabilities for the modeling of various trading conditions.




    Common settings
    In this section, you can set the maximum number of open orders and positions, which can simultaneously exist on the account. Additionally, you can configure sessions during which the program is not allowed to trade.


    Margin
    The section allows configuration of margin reserving rules and position accounting systems to be used in testing:

    • Risk management — risk management model: OTC and exchange model, netting and hedging systems. For details please read the Documentation.
    • Margin call level — when this level is reached, the account switches to the Margin Call state.
    • Stop out level — when this level is reached, all orders are canceled and all trading positions are closed. These levels can be indicated in percentage and in money. If "in money' is selected, the levels are defined as the account's Equity value. If "In percent" is selected, the levels are defined as the account "Margin level" value (Funds/Margin*100).
    • Unrealized profit — accounting for the current floating profit/loss in the free margin:
      • Do not use unrealized profit/loss — do not include profit/loss of open positions in the calculation.
      • Use unrealized profit/loss — include open positions' profit/loss in the calculation.
      • Use unrealized profit — include only profit.
      • Use unrealized loss — include only loss.
    • Daily fixed profit — accounting for the client's daily fixed profit/loss in the free margin:
      • Use daily fixed profit/loss — include in the free margin profit and loss received during a trading day.
      • Use daily fixed loss — include only loss received during the trade day. During the day, the obtained profit is accumulated in the special account field ("Blocked"). At the end of the trading day, the accumulated profit is released (zeroed) and is added to the account balance (included in the free margin).
    • Release fixed profit at the end of day — this option becomes available only if the option "Use daily fixed loss" is selected. If it is enabled, the accumulated profit will be released (and thus included in the free margin) at the end of the day. Otherwise this profit amount will remain blocked.


    Commission
    This section provides control over commissions charged for all trading operations.

    • Commission may be single-level and multi-level, i.e. be equal regardless of the deal volume/turnover or can depend on their size. Appropriate data is displayed in the terminal.
    • Commission can be charged immediately upon deal execution or at the end of a trading day/month.
    • Different commissions can be charged depending on deal direction: entry, exit or both operation types.
    • Commission can be charged per lot or per deal.
    • Commission can be calculated in money, percentage or points.



  9. Tester: Optimized and accelerated work in the Market Scanner mode, during which multiple testing passes are run for all symbols available in the Market Watch.
  10. Tester: Deal or position size is now taken into account when calculating profit in pips. Previously, the calculation was only performed per one lot.
  11. Tester: Improved control over optimization results graph. The scroll option has been added for a zoomed optimization graph. Double-clicking on a graph point selects the corresponding result in the table of testing passes.
  12. MetaEditor: Added display of SQLite database files (*.db;*.sdb;*.sqlite;*.db3;*.s3db;*.sqlite3) in the Navigator.
  13. MetaEditor: Fixed project property saving errors.
  14. Updated documentation.

The new MetaTrader 5 version will be available through the LiveUpdate system.


 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 build 2360: Extension of SQLite integration

MetaQuotes, 2020.03.05 16:30

The MetaTrader 5 platform update will be released on Friday, March the 6th, 2020. The new version features the following updates:

  1. MQL5: SQLite database operation errors can now be analyzed using standard MQL5 tools. The following error codes have been added:

    • ERR_DATABASE_ERROR — generic error.
    • ERR_DATABASE_INTERNAL — SQLite internal logic error.
    • ERR_DATABASE_PERM — access denied.
    • ERR_DATABASE_BUSY — database file locked.
    • ERR_DATABASE_LOCKED — database table locked.
    • ERR_DATABASE_NOMEM — insufficient memory for completing operation.
    • ERR_DATABASE_READONLY — attempt to write to read-only database.
    • ERR_DATABASE_IOERR — disk I/O error.
    • ERR_DATABASE_CORRUPT — database disk image corrupted.
    • ERR_DATABASE_FULL — insertion failed because database is full.
    • ERR_DATABASE_CANTOPEN — unable to open the database file.
    • ERR_DATABASE_PROTOCOL — database lock protocol error.
    • ERR_DATABASE_SCHEMA — internal use only.
    • ERR_DATABASE_TOOBIG — string or BLOB exceeds size limit.
    • ERR_DATABASE_CONSTRAINT — abort due to constraint violation.
    • ERR_DATABASE_MISMATCH — data type mismatch.
    • ERR_DATABASE_MISUSE — library used incorrectly.
    • ERR_DATABASE_AUTH — authorization denied.
    • ERR_DATABASE_RANGE — bind parameter error, incorrect index.
    • ERR_DATABASE_NOTADB — file opened that is not database file.

  2. MQL5: Fixed operation of the DatabaseImport function which enables data import from a file into a database table.
  3. MetaEditor: Fixed output of strings longer than 32KB to logs.
  4. MetaEditor: Fixed occasional incorrect encoding in messages sent from the Python console (stdout, stderr) into the Errors section of the editor.
  5. Updated documentation.

The new MetaTrader 5 version will be available through the LiveUpdate system.


 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform Build 2450: "Subscriptions" service, UI improvements and revised features in MetaEditor

MetaQuotes, 2020.05.15 13:43

The MetaTrader 5 platform update will be released on Friday, May the 22nd, 2020.


The update only includes 64-bit platform components

We have previously announced the upcoming end-of-support for 32-bit components. From the current update and onward, new versions will only be released for the 64-bit platform. The latest available 32-bit terminal version is build 2360.

If you are still using 32-bit solutions, we recommend switching to 64-bit versions as soon as possible.


The new version features the following changes:


  1. Terminal: We have released the all-new Subscriptions service. Subscriptions offer additional services which can assist you in trading. For example, you can subscribe to high-quality market data from well-known providers, analyze received data and develop new trading strategies. Optionally, you can request personal manager services to help you in learning trading basics or in mastering your platform usage skills.

    The service is currently under development and will become available for use in the next versions.

    How it works
    A new Subscriptions section has been added in the Navigator. All available services are displayed under this section. The list of services is configured on the broker side and thus it depends on the server to which you are connected. Subscriptions are divided into categories for easy browsing.



    Select a service to view its detailed description. Next, click Subscribe. All your active subscriptions are displayed under a separate section.




    When you subscribe to market data, appropriate trading instruments become available for selection in Market Watch. They can be used as regular symbols: view quotes in Market Watch, open charts and analyze them using objects and indicators, as well as run Expert Advisors in the strategy tester. Trading operations for these symbols are not supported.

    How to pay for subscriptions
    You can pay for the services using your trading account funds. There is no need to visit other websites, as the payment can be performed directly from the platform.


    Soon, we will add the possibility to purchase market data subscriptions by connecting to MetaQuotes-Demo
    We plan to set up subscriptions to market data from various exchanges around the world. In just a few clicks, you will be able to receive real-time quotes from Nasdaq, CME, NYSE, BOVESPA and other exchanges. You will be able to pay for subscriptions using an MQL5.community account, similarly to Market, Signals and Hosting purchases.

  2. Terminal: Added new "Show ticker" option in chart settings. The option shows/hides the line containing the trading symbol name, the timeframe and a custom comment.




  3. Terminal: Added option "Show trading history" in terminal settings and in chart settings. The ability to display market entries and exits on charts was available in previous versions but it was managed from the "Toolbox \ History" section. The new option enables a more comfortable setting of history display. You can configure it for all charts at a time or set separately for desired charts.




    Furthermore, you can quickly enable the display of trading history and trading levels using the chart context menu:





  4. Terminal: Added new "Color on White" scheme in chart settings.



  5. Terminal: New commands have been added to position and order context menus, enabling quick opening of the relevant symbol's Market Depth and chart:





  6. Terminal: Added chart frame highlighting. This will help you to find the desired symbol chart when multiple charts are open in the terminal. Select a symbol in the Market Watch, an order or position line in the trading or history section, or an alert, and the frame of the appropriate symbol chart will blink three times.



  7. Terminal: Improved display of trading levels on the chart.

    • Tickets are no longer displayed for positions, orders and levels, in order to keep the chart clean
    • Captions appear in uppercase for better readability
    • Volumes are displayed without the fractional part if it is zero
    • Levels are hidden if the chart height is less than 80 pixels



  8. Added display of symbol description (if it is available) in the upper left chart corner, in addition to symbol name.






  9. New columns have been added in the list of open orders and positions:

    • Change — operation profitability percentage
    • Value — the market value of the position
    • Magic — the identifier of orders and positions opened by the Expert Advisor (magic number)

    The new columns can be shown/hidden using the context menu.


    Position value and magic columns have also been added to the trading history section.

    Furthermore, the profit field in the open positions and history sections is highlighted depending on the operation result.

  10. Terminal: Added support for negative prices. This enables proper platform operation in situations similar to the recent drop of oil prices below zero. This includes:

    • Display of quotes in Market Watch
    • Display of charts and Market Depth
    • Execution of trading operations
    • Calculation of profits and collateral

  11. Terminal: The maximum number of symbols which can be simultaneously enabled in Market Watch has been increased to 5000.
  12. Terminal: Fixed sorting in chats by the last update date.
  13. Terminal: Optimized and accelerated operation with a large number of trading symbols (50,000 and more).
  14. Terminal: Fixed a bug due to which it was impossible to close a position if its current volume did not correspond to the symbol's volume change step.
  15. MQL5: Optimized and accelerated operations with the tick history.
  16. MQL5: Added new functions for working with databases:

    • DatabaseReset — resets the request to the initial state, similar to DatabasePrepare call. The function is intended for multiple execution of a request with different parameter values. For example, when adding data to the table in bulk using the INSERT command, a custom set of field values should be formed for each entry.
    • DatabaseBind — sets a parameter value in a request. The function is used in case an SQL request contains "?" or "?N" parameterizable values where N means the parameter index (starting from one).
    • DatabaseBindArray — sets an array as a parameter value.

  17. MQL5: Added FSD_FILE_MUST_EXIST flag for the FileSelectDialog function. It indicates that the selected files must exist.
  18. MQL5: Values for describing options have been added to the ENUM_SYMBOL_INFO_DOUBLE enumeration:

    • SYMBOL_PRICE_CHANGE — change of the current price relative to the end of the previous trading day in %.
    • SYMBOL_PRICE_VOLATILITY — price volatility in %.
    • SYMBOL_PRICE_THEORETICAL — theoretical option price.
    • SYMBOL_PRICE_DELTA — option/warrant delta. Shows the value the option price changes by, when the underlying asset price changes by 1.
    • SYMBOL_PRICE_THETA — option/warrant theta. Number of points the option price is to lose every day due to a temporary breakup, i.e. when the expiration date approaches.
    • SYMBOL_PRICE_GAMMA — option/warrant gamma. Shows the change rate of delta — how quickly or slowly the option premium changes.
    • SYMBOL_PRICE_VEGA — option/warrant vega. Shows the number of points the option price changes by when the volatility changes by 1%.
    • SYMBOL_PRICE_RHO — option/warrant rho. Reflects the sensitivity of the theoretical option price to the interest rate changing by 1%.
    • SYMBOL_PRICE_OMEGA — option/warrant omega. Option elasticity — a relative percentage change of the option price by the percentage change of the underlying asset price.
    • SYMBOL_PRICE_SENSITIVITY — option/warrant sensitivity. Shows by how many points the price of the option's underlying asset should change so that the price of the option changes by one point.

  19. MQL5: Added export of BLOB fields in HEX format in the DatabaseExport function.
  20. MQL5: New CHART_SHOW_TICKER property has been added to ENUM_CHART_PROPERTY_INTEGER — showing a symbol ticker in the upper left corner. If CHART_SHOW_TICKER is set to false, CHART_SHOW_OHLC is also set to false and thus OHLC is hidden.   
  21. MQL5: The quality of code generated by the compiler has been improved. This enabled the increase of its execution speed.
  22. MQL5: Fixed errors related to the compilation and execution of template functions and classes. These are:

    • Priority mismatch error for overloaded template function calls
    • Template method/class generation error
    • Error caused by an attempt to access an internal class for a template parameter of a template function
    • Template class code generation error caused by the use of an internal class.
    • Error using the B<int> template object before B<void*>
    • Errors in the creation of complex objects having the internal type C and wrapped multiple times
    • Error transferring function pointer argument as const ref template
    • Error passing internal struct to a template function
    • Priority mismatch error for the execution of template functions
    • Incorrect parenthesis count in for and do-while loops
    • Incorrect parenthesis count in class structure description
    • Slowdown when adding one element at a time using ArrayResize
    • Error choosing a matching overloaded function

  23. MQL5: Fixed occasional errors in the CustomTicksReplace function.
  24. MQL5: Fixed selection of the display period for the history of trade orders. Now, the range is based on the order execution date instead of the previously used creation date.
  25. Python: The path parameter has been added to the initialize method — path to metatrader.exe or metatrader64.exe. If the path is not specified, the module attempts to find the executable file on its own.
  26. Python: The following new methods have been added:

    • symbols_get — receives all financial symbols from the MetaTrader 5 terminal.
    • symbols_total — obtains the number of all financial symbols in the MetaTrader 5 terminal.

  27. Python: Added filtering by symbol groups for the following functions: orders_get, positions_get, history_orders_get and history_deals_get. Use call forms with the "group" parameter.
  28. Python: The return value of order_send and order_check is now passed with the 'request' field containing the full description of the original request. For example:
    ...
    comment=Request executed
    request_id=55
    retcode_external=0
    request=TradeRequest(action=1, magic=234000, order=0, symbol='USDJPY', volume=0.1, price=108.018, stoplimit=0.0, ...
        traderequest: action=1
        traderequest: magic=234000
        traderequest: order=0
        traderequest: symbol=USDJPY
        traderequest: volume=0.1
        traderequest: price=108.018
        traderequest: stoplimit=0.0
    ...
  29. Python: When launched on a chart, Python scripts now receive the chart symbol and period (in minutes) as arguments.
    import sys
    
    chart_symbol='unknown'
    chart_tf=1
    
    if len(sys.argv) == 3:
        chart_symbol, chart_tf = sys.argv[1:3];
    
    print("Hello world from", chart_symbol, chart_tf)
    
    >> Hello world from T.NYSE 15
  30. MetaEditor: Added command "Add an existing folder". It enables a batch addition of all supported files from the selected directory into the project.



  31. MetaEditor: Expanded search and replace options.

    Added extended search features with partial regular expression support. Use \r, \n, \t to specify line feed and tab characters in search requests. Search and replace dialogs have been combined into a single multi-tab dialog.




    Added a separate tab for searching in programmer communities. These include MQL5.community, as well as GitHub, MSDN and Stack Overflow.


    Search results from external resources appear in the MetaEditor toolbox window:




    Furthermore, you can immediately download source files from GitHub. Files are downloaded into a separate subdirectory of the Projects folder, named in accordance with the GitHub project name.

    Search results can be additionally sorted by date.

  32. MetaEditor: Added possibility to quickly change font size in the code editing window. To change the font size, press Ctrl and scroll the mouse wheel.
  33. MetaEditor: Added possibility to import tables from CSV files to database tables. The following parameters can be set during import:

    • Table name in the database
    • Automatic or manual file encoding detection
    • Data separator type
    • Skipping of the specified number of lines at the beginning
    • Comment prefix
    • If the file has column names
    • How line breaks will be determined
    • Whether data should be added to a new table or to an existing one
    • What quotes to use for strings




  34. MetaEditor: Added quick commands for inserting time and color into the program source code. Select the desired values from the interactive calendar and the palette, and the editor will insert them in the appropriate format.





  35. MetaEditor: MQL4 support has been disabled, since only 64-bit code is generated now.
  36. MetaEditor: Fixed Class snippet operation.
  37. MetaEditor: Fixed support for absolute paths in projects.
  38. Updated documentation.


The new version will be available through the LiveUpdate system.


 
Comments that do not relate to this topic, have been moved to "Off Topic Posts".
 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform build 2470

MetaQuotes, 2020.05.28 16:12

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

  1. Terminal: Fixed a bug which caused the inability to add financial symbols with '-', '=', '_' and '+' in their names into Market Watch.
  2. MQL5: Optimized and improved code formatting in the MQL5 Standard Library.
  3. MetaEditor: Fixed expanded search by the '\n' and '\r' end-of-line characters.
  4. Updated documentation.

The new version will be available through the LiveUpdate system.

 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 Platform Build 2485: iCustom improvements and overall optimization in MQL5

MetaQuotes, 2020.06.05 08:44

The MetaTrader 5 platform update will be released on Friday, June the 5th, 2020.

Recompile your products in the Market

We urge the programmers who publish their products in the Market to recompile files using the new platform version and to upload the updated files into the Market. The current version provides important fixes in MQL5. The errors can negatively affect the execution of programs and we therefore recommend recompiling your files.


The new version features the following changes:

  1. Terminal: Optimized and significantly accelerated bar history editing for custom financial instruments. The improvement also concerns the CustomRatesUpdate function.
  2. Terminal: Fixed exporting of custom symbol settings to a JSON file.
  3. MQL5: This version features a revised custom indicator loading algorithm via iCustom.

    If the backslash '\' is indicated before the custom indicator name, the EX5 indicator file is searched relative to the MQL5 root folder. So, for a call of iCustom(Symbol(), Period(), "\FirstIndicator"...), the indicator will be loaded as MQL5\FirstIndicator.ex5. If the file is not found at this path, error 4802 (ERR_INDICATOR_CANNOT_CREATE) is returned.

    If the path does not start with a backslash '\', the indicator is searched and loaded based on the following sequence of actions:

    • The EX5 file is searched in the same folder, where the caller program's EX5 is located. For example, the CrossMA.EX5 Expert Advisor is located at MQL5\Experts\MyExperts. It contains the following call: iCustom(Symbol(), Period(), "SecondIndicator"...). In this case, the indicator is searched at MQL5\Experts\MyExperts\SecondIndicator.ex5.
    • If the indicator is not found, a search relative to the Indicators root directory is performed: MQL5\Indicators. Thus, file MQL5\Indicators\SecondIndicator.ex5 is searched. If the indicator is not found, the function returns INVALID_HANDLE and error 4802 (ERR_INDICATOR_CANNOT_CREATE) is raised.

    If the indicator path is set in a subdirectory such as MyIndicators\ThirdIndicator, the search starts in the folder of the calling program (the Expert Advisor is located in the folder MQL5\Experts\MyExperts) at the following path: MQL5\Experts\MyExperts\MyIndicators\ThirdIndicator.ex5. In case of failure, file MQL5\Indicators\MyIndicators\ThirdIndicator.ex5 is searched. Please note that the path separator should be specified as a double backslash '\\'. For example: iCustom(Symbol(), Period(), "MyIndicators\\ThirdIndicator"...)

    Also, if a custom indicator call via iCustom is found in the program code, the compiler will implicitly add the "#property tester_indicator XXX" directive if it is not specified.

  4. MQL5: Optimized and significantly accelerated HistorySelect function, which allows requesting the history of deals and orders.
  5. MQL5: Fixed an occasional error in tick requesting via the CopyTicksRange function. The error caused the range beginning to be set to the day beginning rather than to the specified time.
  6. MQL5: Optimized and significantly accelerated display of alerts via the Alert function.
  7. MQL5: New property SYMBOL_TIME_MSC for the symbol's last tick time in milliseconds. The property can be obtained using the SymbolInfoInteger function.
  8. Fixed errors reported in crash logs.
The new version will be available through the Live Update system.

 

Forum on trading, automated trading systems and testing trading strategies

New MetaTrader 5 platform build 2530: Sorting in Market Watch and advanced operations with optimization results

MetaQuotes, 2020.07.09 16:20

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


  1. Terminal: A sorting option has been added to the Market Watch window:

    • Click on a column name to sort the list by required data, such as the symbol name, close price, daily change or other variables.
    • Use the new menu with the most popular sorting options. Sorting by the highest growth and fall based on a daily symbol price change can be useful when trading exchange instruments.




  2. Terminal: Redesigned and improved built-in learning system.

    All interactive hints are grouped into various categories for easier navigation. The number of completed and remaining hints is shown for each category.



    Every hint is now provided with a checklist, indicating the key action which the user should execute in order to complete training.

    We have also revised the learning system design and fixed errors in the total progress calculation.

  3. Terminal: Added automated calculation of a symbol's previous session close time and of its current session open time. If the appropriate data is not provided by the broker directly, the terminal will calculate the values based on the first and the last quotes in a session. The relevant information can be displayed in the Market Watch window: enable appropriate columns in the "Symbols" section or navigate to the "Details" section.



  4. Terminal: Optimized and accelerated application of prices to open positions. When new ticks arrive in the terminal, prices, profit and margin requirements are updated faster.
  5. Terminal: Fixed calculation of the built-in Stochastic Oscillator. An error could occur in the case where a limited number of bars was displayed on charts.
  6. MQL5: Optimized and accelerated AccountInfo* function which provides access to trading account properties.
  7. MQL5: Optimized and accelerated access to numerical chart properties via the ChartGetInteger function.
  8. MetaEditor: The following context menu commands have been added to the code editing tabs for efficient operations with the MQL5 Storage:

    • Compare a working copy of a file with the current revision
    • Revert changes
    • View file change history




  9. MetaEditor: Changed the highlighting of matching brackets. Now, highlighting is applied to brackets instead of the background. The highlighting is disabled by default. It can be enabled in editor settings.



  10. MetaEditor: Improved search and replace functions:

    • If you select a text in the file and bring up the search box, the text will be automatically substituted in the "Find" field. If no text is selected, a text from the clipboard will be pasted in the "Find" field. If the clipboard is empty, the focus in the search box will be set to the "Find" field.
    • A similar behavior is implemented for the replace window: the selected text is inserted in the search field, and the cursor is moved to the "Replace with" field. Thus, you can immediately enter the required new text.
    • Search and replace results are now displayed in the log instead of the previously used separate dialog box. If the Toolbox window is enabled, the Journal tab will be automatically selected in it. Thus, you do not need to work with extra windows.

  11. MetaEditor: Fixed search in the file comparison window when working with the MQL5 Storage.
  12. MetaEditor: Added possibility to search and replace data in files connected to the current file via the #include directive.

    The new option enables faster operations with projects consisting of multiple files. For example, to replace a text in all files, you will not need to specify their directories manually. The editor can automatically find them through the #include directives.



  13. Tester: We have revised optimization criteria which include two variables, one of which is the balance. Now, the criteria only take into account the second variable and ignore the balance. The new optimization criteria are easier to analyze.

    • Balance + Maximum Profitability -> Maximum Profitability
    • Balance + Maximum Expected Payoff -> Maximum Expected Payoff
    • Balance + Minimum Drawdown -> Minimum Drawdown
    • Balance + Maximum Recovery Factor -> Maximum Recovery Factor
    • Balance + Maximum Sharpe Ratio -> Maximum Sharpe Ratio




  14. Tester: New quick commands in the "Optimization parameters" submenu, allow showing or hiding, of all input columns in the table with optimization results:



  15. Tester: Added coloring for the optimization results table and graph, for a more convenient visual analysis.

    The graph is colored with a green-to-red gradient, depending on the value of the optimization criterion. The following colors are used for the table:

    • Balance: values above the initial deposit are colored in blue, and those below the initial deposit are shown in red.
    • Profit: blue is used for values greater than zero, and red is used for values less than zero.
    • Expected Payoff: blue is used for values greater than zero, and red is used for values less than zero.
    • Drawdown: from green (0-5%) to red (greater than 30%).
    • Sharpe Ratio: from green (greater than 2) to red (less than 0).
    • Recovery Factor: from green (greater than 2) to red (less than 1).



  16. Tester: Filters have been added in the optimization results table. Use the filters to hide unsuccessful passes from the list:

    • Passes without trades
    • Loss-making passes
    • Passes with the drawdown greater than 50%
    • Passes with the Recovery Factor less than 1
    • Passes with the Sharpe Ratio less than 0.5



  17. Tester: Optimized work of the MQL5 Cloud Network. Now, when an optimization is launched for the same Expert Advisor, the network tries to use the same testing agents which were used during the previous optimization pass. This is because the required market environment, including the trading history, is already available for such agents.
  18. Updated documentation.


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 2560: Built-in learning system improvements

MetaQuotes, 2020.07.23 14:34

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


  1. Terminal: In the previous platform update, we have presented a completely revised learning system. Further improvements have been implemented in the latest version:

    • The progress bar icon has become more visible
    • The text of some hints has been revised
    • Learning progress calculation has been fixed

    Complete all lessons to start using the platform capabilities to the maximum.



  2. Terminal: Optimized and significantly accelerated processing of large tick streams (with more than tens of thousands of ticks per minute).
  3. Terminal: Fixed errors in the calculation of price changes relative to the previous session close price. To view this variable, enable the "Daily Change" column in the Market Watch context menu.
  4. MQL5: Optimized and accelerated access to numerical chart properties via the ChartGetInteger function.
  5. MQL5: Fixed custom indicator search, when such an indicator is requested from an MQL5 program via the iCustom function.
  6. MetaEditor: Added compilation of C/C++ programs in projects.
  7. Tester: Significantly optimized work of the MQL5 Cloud Network. Now, the Network can distribute tasks and return calculation results faster due to the improved agent search efficiency.
  8. Updated documentation.


The update will be available through the Live Update system.