How to Start with MT5, a summary ! - page 7

 

Learning ONNX for trading 

Forum on trading, automated trading systems and testing trading strategies

Learning ONNX for trading

MetaQuotes , 2023.03.30 17:44

2. Converting Models to #ONNX Format




Describes various ways to convert machine learning models to the ONNX format for use with the ONNX Runtime. ONNX is compatible with many popular machine learning libraries such as PyTorch, TensorFlow and Scikit-Learn.

To convert a model to the ONNX format, you must use the appropriate conversion library, and then create an ONNX model using this library. This allows the model to be used with ONNX Runtime, which improves its performance and makes it compatible with multiple platforms.

Examples of converting models to the ONNX format using PyTorch and TensorFlow are given.


Learning ONNX for trading
Learning ONNX for trading
  • 2023.03.31
  • www.mql5.com
We have added support for ONNX models in MQL5 since we believe this is the future...
 

Learning ONNX for trading  

Forum on trading, automated trading systems and testing trading strategies

Learning ONNX for trading

MetaQuotes , 2023.03.30 17:45

3. ONNX – open format for machine learning models​




Describes the ONNX format, which is an open format for storing machine learning models . It is possible to convert models from various frameworks to the ONNX format, which ensures their compatibility and ease of use.

Examples of compatible formats such as TensorFlow, PyTorch, Keras, and scikit-learn are provided, and the benefits of using ONNX are discussed, such as faster model execution time and optimized performance on specific hardware.

In the next video, the author promises to show how to convert a model from Keras to ONNX format and test it on the example of image classification and image segmentation problems.


Learning ONNX for trading
Learning ONNX for trading
  • 2023.03.31
  • www.mql5.com
We have added support for ONNX models in MQL5 since we believe this is the future...
 

Learning ONNX for trading 

Forum on trading, automated trading systems and testing trading strategies

Learning ONNX for trading

MetaQuotes , 2023.03.30 17:46

4. (Deep) Machine Learned Model Deployment with ONNX




Discusses the development of a Microsoft open source machine learning library that has been published on GitHub.

The author explains the problem of deploying a machine learning model , where the model is built on a large machine with gigabytes of memory, but its usage conditions are very different and require optimization for one prediction at a time.

The author demonstrates the performance of various libraries such as scikit-learn, XGBoost and ML.NET and shows that the performance difference decreases as the package size increases. The author also presents ONNX as an optimization solution in such cases.


Изучаем ONNX для применения в трейдинге
Изучаем ONNX для применения в трейдинге
  • 2023.03.30
  • www.mql5.com
Мы добавили в MQL5 поддержку ONNX моделей , так как считаем, что за этим будущее...
 

Learning ONNX for trading 

Forum on trading, automated trading systems and testing trading strategies

Learning ONNX for trading

MetaQuotes , 2023.03.30 17:46

5. Recurrent Neural Networks | LSTM Price Movement Predictions For Trading Algorithms



The video discusses the use of recurrent neural networks, specifically LSTM networks, to predict price movements in financial markets such as FOREX, stocks, and cryptocurrencies.

The algorithm is written in Python and can be downloaded for experiments with changing the parameters of the algorithm.

Deep learning is known as an excellent predictive algorithm, here we test it in trading and price movement prediction. Technical indicators are also added, such as the RSI relative strength indicator and MA moving averages, to expand the inputs for the trading pattern.


Изучаем ONNX для применения в трейдинге
Изучаем ONNX для применения в трейдинге
  • 2023.03.30
  • www.mql5.com
Мы добавили в MQL5 поддержку ONNX моделей , так как считаем, что за этим будущее...
 

Forum on trading, automated trading systems and testing trading strategies

Usefull links/threads/tools

Sergey Golubev, 2023.03.28 10:11

ONNX and  MQL5 Copilot


The forum

  1. MetaEditor, Open AI and ChatGPT - summary thread
  2. Learning ONNX for trading - key forum thread about ONNX
  3. Practical examples: this page

    CodeBase

    1. Information about the ONNX model's inputs and outputs - script for MetaTrader 5
    2. Get info about inputs and outputs of onnx-model - script for MetaTrader 5

    Documentation

    1. ONNX models in machine learning (MT5)

    Learning ONNX for trading - the video:

    1. ONNX Runtime - post  #60
    2. Converting Models to #ONNX Format - post  #61
    3. ONNX – open format for machine learning models​ - post #62
    4. (Deep) Machine Learned Model Deployment with ONNX - post  #63
    5. Recurrent Neural Networks | LSTM Price Movement Predictions For Trading Algorithms- post 
    6. Artificial Intelligence Full Course | Artificial Intelligence Tutorial for Beginners | Edureka - post  #230
    7. Open Neural Network Exchange (ONNX):
      7.1. Introduction to ONNX - Tutorial 1 - post
      7.2. Challenges in Deep Learning - Tutorial 2 - post
      7.3. All about ONNX - Tutorial 3 - post
      7.4. Design principles - Tutorial 4 - post
      7.5. ONNX file format - Tutorial 5 - post
      7.6. ONNX Data Type - Tutorial 6 - post
      7.7. Machine Learning Example - Tutorial 7 - post
      7.8. ONNX Runtime - Tutorial 8 - post
      7.9. ONNX Model Zoo - Tutorial 9 - post
      7.10. ONNX Model Zoo Demo - Tutorial 10 - post
      7.11. PyTorch to Tensorflow Demo - Tutorial 11 - post
    8. MIT Introduction to Deep Learning:
      8.1. Introduction to Deep Learning - Lecture 1 - post
      8.2. Recurrent Neural Networks and Transformers -  Lecture 2 - post
      8.3. Convolutional Neural Networks - Lecture 3 - post 
      8.4. Deep Generative Modeling -  Lecture 4 - post
      8.5. Reinforcement Learning -  Lecture 5 - post
      8.6. Deep Learning New Frontiers -  Lecture 6 - post
      8.7. LiDAR for Autonomous Driving -  Lecture 7 - post
      8.8. Automatic Speech Recognition -  Lecture 8 - post
      8.9. AI for Science -  Lecture 9 - post
      8.10. Uncertainty in Deep Learning -  Lecture 10 - post


       

      Forum on trading, automated trading systems and testing trading strategies

      MetaTrader 5 platform beta build 3770: Book or Cancel orders, AI coding assistant, and enhanced ONNX support

      MetaQuotes, 2023.05.25 16:11

      The beta version of the updated MetaTrader 5 platform will be released on Friday, May 26, 2023.

      In the new version, we have added support for Book or Cancel orders. Such orders can only be placed in the Depth of Market, but they cannot be filled immediately. They are used to implement passive exchange trading.

      In the new MetaEditor version, we have implemented integration with Copilot, an AI-powered coding assistant. You can write a trading idea in a natural language, and Copilot will offer its MQL5 implementation.

      Also, the new version provides significantly enhanced support for operations with ONNX machine learning models. These models can be opened directly in MetaEditor through the built-in viewer or through the specialized Netron viewer.

      MetaTrader 5 platform beta build 3770: Book or Cancel orders, AI coding assistant, and enhanced ONNX support

      The updated web terminal displays balance transactions and totals in the history section and is available in 24 languages.

      From this build onwards, the installers will work only with 64-bit platform versions. Support for 32-bit versions will be discontinued. Previously installed 32-bit platform versions will work until January 1, 2024.

      We invite traders to join the testing of the new platform version, to evaluate its features and to help developers fix errors. To update the MetaTrader 5 platform to the new beta build, navigate to Help \ Check Desktop Updates \ Latest Beta Version:

      Update to beta and join testing


      The final build of the new MetaTrader 5 platform will be released after the public beta test.

      The update provides the following changes:


      MetaTrader 5 Client Terminal build 3770

      1. Terminal: Added support for the new order filling policy — Passive / Book or Cancel (BOC).


        New order filling policy — Passive / Book or Cancel


        The BOC policy indicates that an order can only be placed in the Depth of Market (order book). If the order can be filled immediately when placed, this order is canceled. This policy guarantees that the price of the placed order will be worse than the current market price. BOC is used to implement passive trading: it is guaranteed that the order cannot be executed immediately when placed and thus it does not affect current liquidity. This filling policy is only supported for limit and stop limit orders in the Exchange Execution mode.

        The availability of the new filling policy depends on the broker.

      2. Terminal: The platform switches to using Microsoft Edge WebView2 for displaying the HTML content.

        Compared to the outdated MSHTML, the new component significantly expands content displaying capabilities by providing access to modern technologies. The use of WebView2 improves the appearance of some platform sections, increases performance, and creates a more responsive interface. In particular, the new component will affect the Market, Signals and VPS sections.
        Full support for WebView2 was introduced in Windows 10. We strongly recommend that all users upgrade to the latest operating system version and install all available updates. The platform will continue to use MSHTML under Windows 7 and Wine, but the new features will not be available. The minimum recommended operating system version is Windows 10 21H2 (build 19044, November 2021).

      3. Terminal: Improved Market security system. Now, in order to run the product, the user must be authorized in the platform with the same MQL5 account via which the product was purchased. The account must be specified under the Tools \ Options \ Community section:


        Specify your MQL5 account in the platform settings


        If no account or an invalid account is specified, the product will not start, and the following message will be printed in the platform journal:
        'ProductName' requires active MQL5 account in Tools->Options->Community
      4. Terminal: Added Overview command to the history section context menu. The command opens a trading report for the account:


        Command to go to the trading report


      5. Terminal: Fixed display errors in the two-factor authentication dialog. If the terminal had several accounts with the same number but opened with different brokers, the account connection form could fail to display the one-time password field.
      6. Terminal: Implemented faster rendering of indicators with the DRAW_COLOR_CANDLES display style.
      7. Terminal: Fixed trading report creation errors. On-chart profit and equity values could be displayed incorrectly under certain conditions.
      8. Terminal: Added display of Costs in the trading report. The value shows the total costs incurred when performing deals relative to the symbol's current mid-point price (mid-point spread cost). This is the amount which the trader lost due to the spread. The availability of this value depends on the broker.
      9. Terminal: Updated UI translations.
      10. Terminal: Improved stability under Wine, especially on macOS systems. We recommend completely removing old terminals and re-installing them:


      11. Terminal: Accelerated package installation and updates downloading procedures. Improved analysis of AVX availability on the user's computer when selecting a distribution package.
      12. Terminal: Enabled support for TLS 1.3 in web protocols. TLS 1.0 is considered deprecated and insecure and has therefore been disabled.
      13. Terminal: Fixed accounting for agent commissions in trading history reports. The relevant transactions could be ignored when calculating the final profit.
      14. MQL5: Added new STAT_COMPLEX_CRITERION value in the ENUM_STATISTICS enumeration. Use the property to obtain the calculated complex criterion value, as a result of optimization.
      15. MQL5: Improved RegressionMetric method used for calculating the regression metric based on the passed matrix or vector. Added vector_true and matrix_true parameters for passing true values which evaluate the predicted data quality.
        double vector::RegressionMetric(
           const vector& vector_true,            // true values
           const ENUM_REGRESSION_METRIC  metric  // metric
           );
         
        double matrix::RegressionMetric(
           const matrix& matrix_true,            // true values
           const ENUM_REGRESSION_METRIC metric   // metric
           );
         
        vector matrix::RegressionMetric(
           const matrix& matrix_true,            // true values
           const ENUM_REGRESSION_METRIC metric,  // metric
           const int                      axis   // axis
           );
      16. MQL5: Modified the OnnxTypeInfo structure which is used for operations with ONNX (Open Neural Network Exchange) models:

        struct OnnxTypeInfo
          {
           ENUM_ONNX_TYPE       type;            // parameter type
           OnnxTensorTypeInfo   tensor;          // tensor description
           OnnxMapTypeInfo      map;             // map description
           OnnxSequenceTypeInfo sequence;        // sequence description
          };

        The data type is specified in the structure using new substructures:

        • OnnxTensorTypeInfo — tensor
        • OnnxMapTypeInfo — map
        • OnnxSequenceTypeInfo — sequence

        struct OnnxTensorTypeInfo
          {
           ENUM_ONNX_DATATYPE   data_type;       // data type in the tensor
           long                 dimensions[];    // number of elements
          };
        
        struct OnnxMapTypeInfo
          {
           ENUM_ONNX_DATA_TYPE  key_type;        // key type
           OnnxTypeInfo         type_info;       // value type
          };
        
        struct OnnxSequenceTypeInfo
          {
           OnnxTypeInfo         type_info;       // data type in the sequence
          };
        Depending on OnnxTypeInfo::type (ONNX_TYPE_TENSOR, ONNX_TYPE_MAP or ONNX_TYPE_SEQUENCE), the relevant substructure is filled.

      17. MQL5: Improved support for ONNX models.
      18. MQL5: Added CopyIndicatorBuffer methods which enable the obtaining of indicator buffer data into a vector.
        bool vector<T>::CopyIndicatorBuffer(long indicator_handle,ulong buffer_index,ulong start_pos,ulong count);
        bool vector<T>::CopyIndicatorBuffer(long indicator_handle,ulong buffer_index,datetime start_time,ulong count);
        bool vector<T>::CopyIndicatorBuffer(long indicator_handle,ulong buffer_index,datetime start_time,datetime stop_time);
      19. MQL5: Fixed operations with arrays having two or more dimensions in the FrameAdd and FrameNext methods.
      20. MQL5: Fixed CRedBlackTree::Remove Standard Library method.
      21. MQL5: Implemented fixes in the Fuzzy Logic library.
      22. MetaEditor: Added integration with the advanced automatic coding assistant Copilot. Its operation is based on OpenAI models. Enter a comment or part of a function and send a prompt. The neural network will analyze the prompt and will offer coding options to implement the idea.


        Copilot coding assistant


        Depending on the file type, the string "MQL5 language", "Python language" or "C++ language" is automatically inserted at each prompt beginning. Thus, the neural network will provide the result in the required language.

        Copilot is currently free and is already enabled in the editor. There are several options available under Tools \ Options \ Copilot:


        Copilot settings


        Payment settings:

        • Use your MQL5 account: this option is currently available for free. Later, you will be able to pay for the subscription directly from your MQL5 account balance.
        • Use an OpenAI key, if you have purchased a subscription and have the relevant key.

        Prompt settings:

        • Model — a neural network which will process your requests. text-davinci-003 and gpt-3.5-turbo are currently available. Support for gpt-4 will be added soon.
        • Maximum tokens — the number of text units which the model can return in response to a prompt.
        • Variability — affects how strictly the neural network will follow the prompt. The smaller the value, the greater the result randomness. This option corresponds to the temperature parameter in OpenAI models.

      23. MetaEditor: Added ability to view the properties of ONNX models.

        You can view the contents of the *.onnx file directly in the editor. As an example, find the project ONNX.Price.Prediction under Toolbox \ Public Projects and select Join in the context menu. The project will be downloaded to your computer and will appear in the Navigator.


        Open ONNX models directly in MetaEditor


      24. MetaEditor: Added ability to visualize machine learning models and neural networks using Netron. This viewer supports popular models, including ONNX, TensorFlow Lite, Caffe, Keras and ncnn, among others.

        To view a model, select its file in the Navigator and click "Open in Netron". If this utility is not installed, its GitHub page will open, from which you can download the relevant installer, according to your operating system. For example, use Netron-Setup-X.X.X.exe for Windows. If the program is installed, the model will immediately open for viewing from the Navigator.


        Visualize machine learning models with Netron


        Supported formats:

        • armnn, caffemodel, circle, ckpt, cmf, dlc, dnn, h5, har, hd5, hdf5, hn, keras, kmodel,
        • lite, mar, meta, mge, mlmodel, mlnet, mlpackage, mnn, model, nb, ngf, nn, nnp,
        • om, onnx, ort, paddle, param, pb, pbtxt, pdiparams, pdmodel, pdopt, pdparams, prototxt, pt, pth, ptl,
        • rknn, t7, tfl, tflite, tmfile, tm, tnnproto, torchscript, uff, xmodel

      25. MetaEditor: Updated UI translations.
      26. Tester: Fixed calculation of the "Average losing trade" metric in the testing report. Previously, the calculation could erroneously include entry deals if commissions were charged for such deals.
      27. Tester: Improved custom commission options in the strategy tester. To set a symbol, specify its name rather than the entire path.
      28. Tester: Updated icons in the strategy tester. New metaphors will make them easier to understand.
      29. Fixed errors reported in crash logs.

      MetaTrader 5 Web Terminal build 3770

      1. Improved trading history section:

        • Added display of balance operations in the trading history, such as deposits and withdrawals, commissions, and adjustments.
        • Added display of totals in the trading history: balance, profit, commission, deposits, withdrawals and number of orders, among others.
        • Added ability to sort operations and filter the history by depth in the mobile version.


        Updated trading history section


      2. Enhanced symbol contract specifications. The following information has been added: volume limit, tick size and value, initial and hedged margin.
      3. Improved color schemes:

        • Pending orders are displayed in gray on the chart. The position color depends on the direction: red for Sell and blue for Buy. The new colors provide easier navigation especially if a lot of operations are displayed on the chart.
        • When viewing/editing a position, only this position and its levels are highlighted, while all other positions and orders become gray, and their levels are hidden from the price scale. Thus, it will be easier to manage separate operations.
        • The Stop Loss color has been changed from red to orange to avoid confusion with Sell positions.
        • Improved on-chart icons indicating position closing time. A green icon is used for positions closed by Take Profit and a red one is used for those closed by Stop Loss.

      4. Added interface translations into Arabic, Bulgarian, Vietnamese, Greek, Indonesian, Malay, Dutch, Persian, Polish, Thai, Ukrainian and Hindi. The web terminal is now available in 24 languages.
      5. Fixed Turkish UI translations.
      6. Fixed modification and deletion of pending orders in the Web Terminal mobile version.
      7. Fixed on-chart 'closed market' tooltip.
      8. Fixed display of profits in the position close button in the trading dialog. The error occurred during partial closing.
      9. Fixed display of on-chart trading notifications.
      10. Fixed volume modification using arrows in the Depth of Market.
      11. Fixed error which could cause the settings of running indicators to be reset under certain conditions.
      12. Fixed username checks when opening new accounts. Previously, an apostrophe in the name was considered an error.
      13. Fixed processing of requotes. The dialog with the requoted prices might not be displayed under certain conditions.
      14. Fixed display of the Ichimoku Kinko Hyo indicator. The Chikou-Span, Up Kumo and Down Kumo lines will be displayed with the correct offset.

      MQL5.community

      1. The MQL5 Cloud Network website has been completely redesigned: https://cloud.mql5.com.

        Learn how to use the processing power of thousands of computers around the world to optimize your trading strategies. With the MQL5 Cloud Network, even the heaviest computations can be completed in a matter of minutes. Visit the website and find out how to participate in the network and how to earn money by providing your computer resources.


        Visit the updated MQL5 Cloud Network website


      2. Improved screenshot section in Market products. Authors can upload images up to 1920*1800 pixels to demonstrate how applications work. The screenshot gallery has also been updated. The carousel shows image thumbnails, and a click on them opens full-sized images.


        Improved screenshot section in the Market


      3. Freelance section improvements. Users will now receive more tips when placing their first orders:

        • Requirements specification examples and a reminder to add one
        • Order creation instructions
        • Template usage tips

        These tips can assist you in creating the order and in receiving the desired result.


        Freelance improvements


      The update will be available through the Live Update system.


       

      Forum on trading, automated trading systems and testing trading strategies

      Where Do I start from?

      Sergey Golubev, 2023.06.20 19:38

      How to Become a Successful Signal Provider on MQL5.com

      The objective of a successful signal provider is to discover a robust and profitable strategy that allows them to capture a small portion of that pie daily, broadcasting it to a large number of subscribers simultaneously.

       

      Forum on trading, automated trading systems and testing trading strategies

      MetaTrader 4 and MetaTrader 5 web terminals moved to new address

      MetaQuotes, 2023.06.30 16:34

      The old web terminal for both platforms at https://trade.mql5.com/trade is now available at https://metatraderweb.app/trade. As before, it can be accessed through the WebTerminal section of the current website. Please note that support for this MetaTrader 5 Web version will permanently end on August 1, 2023 while MetaTrader 4 Web will continue to operate.


      If you are using the old MetaTrader 5 Web terminal, we strongly recommend that you request from your broker the new version of MetaTrader 5 WebTerminal. It is more efficient, more functional and works on any platform, including Linux, Mac, iOS and Android OS. Furthermore, it is compatible with any modern browser. All new technologies and services will appear only in the new web terminal. Unlike the old version, MetaTrader 5 WebTerminal will allow connection only to the specific broker, based on domain linkage. This also means that you will no longer have to look for a broker in the available list, but rather only enter your trading account login and password.


       

      ---------------------

      Does your broker offer free VPS for trading?
      Does your broker offer free VPS for trading?
      • 2023.08.03
      • www.mql5.com
      MetaQuotes is dedicated to expanding the algorithmic trading community worldwide. One of the most notable achievements is this MQL5...
       

      The announcement: How MetaTrader VPS works  

      ---------------------

      Reason: