MetaTrader 5 Python User Group - the summary - page 29

 

ONNX trader - expert for MetaTrader 5

ONNX trader - expert for MetaTrader 5

The machine learning model is pre-trained and stored.

The bot already has a simple filter in the form of the RSI indicator.

 

Deep Learning GRU model with Python to ONNX with EA, and GRU vs LSTM models 

Deep Learning GRU model with Python to ONNX with EA, and GRU vs LSTM models

This is the continuation of Deep Learning Forecast and Order Placement using Python, the MetaTrader5 Python package and an ONNX model file, but you continue this one without the previous one. All will be explained. Everything we will use is included in this article. In this section, we will guide you through the entire process, culminating in the creation of an Expert Advisor (EA) for trading and subsequent testing.

Machine learning is a subset of artificial intelligence (AI) that focuses on developing algorithms and statistical models that enable computers to perform tasks without being explicitly programmed. The primary goal of machine learning is to enable computers to learn from data and improve their performance over time.

Deep Learning Forecast and ordering with Python and MetaTrader5 python package and ONNX model file
Deep Learning Forecast and ordering with Python and MetaTrader5 python package and ONNX model file
  • www.mql5.com
The project involves using Python for deep learning-based forecasting in financial markets. We will explore the intricacies of testing the model's performance using key metrics such as Mean Absolute Error (MAE), Mean Squared Error (MSE), and R-squared (R2) and we will learn how to wrap everything into an executable. We will also make a ONNX model file with its EA.
 

Cross-validation and basics of causal inference in CatBoost models, export to ONNX format

Cross-validation and basics of causal inference in CatBoost models, export to ONNX format

In the previous articles, I have described various ways to use machine learning algorithms to create trading systems. Some turned out to be quite successful, others (mostly from early publications) were greatly overtrained. Thus, the sequence of my articles reflects the evolution of understanding: what machine learning is actually capable of. We are, of course, talking about the classification of time series.

The current article is a development of the previous topic and the next step towards creating a self-training algorithm that is able to look for patterns in data while minimizing overfitting. After all, we want to get a real effect from the use of machine learning, so that it not only generalizes training examples, but also determines the presence of cause-and-effect relationships in them.

Cross-validation and basics of causal inference in CatBoost models, export to ONNX format
Cross-validation and basics of causal inference in CatBoost models, export to ONNX format
  • www.mql5.com
The article proposes the method of creating bots using machine learning.
 

Seasonality Filtering and time period for Deep Learning ONNX models with python for EA

When I read the article: Benefiting from Forex market seasonality, I thought of this to make this what I think is an interesting article. I could start comparing an EA with and without seasonality's and with to see if it can benefit. 

First of all we will compare models with and without filtering with using an EA, to see how filtering data affects or not, and, after this, we will discuss seasoning with a graph, to end up with a real case of study, for February 2024, with and without seasoning. In the last part of the article (which I find very interesting), we will discuss other approaches to the EA we already have from the article: How to use ONNX models in MQL5 , and we will see if we can benffit of finetuning those EA's and ONNX models, and yes, the answer is that yes we can.)

Seasonality Filtering and time period for Deep Learning ONNX models with python for EA
Seasonality Filtering and time period for Deep Learning ONNX models with python for EA
  • www.mql5.com
Can we benefit from seasonality when creating models for Deep Learning with python? Does filtering data for the ONNX models help to get better results? What time period should we use? We will cover all of this over this article.
 

Python, ONNX and MetaTrader 5: Creating a RandomForest model with RobustScaler and PolynomialFeatures data preprocessing

Random Forest is widely used in a variety of fields, and its flexibility makes it suitable for both classification and regression problems. In a classification task, the model decides which of the predefined classes the current state belongs to. For example, in the financial market, this could mean a decision to buy (class 1) or sell (class 0) an asset based on a variety of indicators.

However, in this article, we will focus on regression problems. Regression in machine learning is an attempt to predict the future numerical values of a time series based on its past values. Instead of classification, where we assign objects to certain classes, in regression we aim to predict specific numbers. This could be, for example, forecasting stock prices, predicting temperature or any other numerical variable.

Python, ONNX and MetaTrader 5: Creating a RandomForest model with RobustScaler and PolynomialFeatures data preprocessing
Python, ONNX and MetaTrader 5: Creating a RandomForest model with RobustScaler and PolynomialFeatures data preprocessing
  • www.mql5.com
In this article, we will create a random forest model in Python, train the model, and save it as an ONNX pipeline with data preprocessing. After that we will use the model in the MetaTrader 5 terminal.
 

ONNX and  MQL5 Copilot


The forum

  1. MetaTrader 5 Python User Group - the summary (about ONNX as well)
  2. MetaEditor, Open AI and ChatGPT - summary thread (excluding ONNX)
  3. Learning ONNX for trading - key forum thread about ONNX
  4. Practical examples: this page

The articles

  1. How to use ONNX models in MQL5 - Metatrader 5 
  2. Overcoming ONNX Integration Challenges - Metatrader 5
  3. Python, ONNX and MetaTrader 5: Creating a RandomForest model with RobustScaler and PolynomialFeatures data preprocessing - Metatrader 5
  4. Seasonality Filtering and time period for Deep Learning ONNX models with python for EA - Metatrader 5
  5. Cross-validation and basics of causal inference in CatBoost models, export to ONNX format - Metatrader 5
  6. Working with ONNX models in float16 and float8 formats - Metatrader 5
  7. Data label for time series mining (Part 6):Apply and Test in EA Using ONNX - Metatrader 5
  8. Evaluating ONNX models using regression metrics - MT5
  9. An example of how to ensemble ONNX models in MQL5 - Metatrader 5
  10. Wrapping ONNX models in classes - Metatrader 5
  11. OpenAI's ChatGPT features within the framework of MQL4 and MQL5 development - Metatrader 5
  12. Classification models in the Scikit-Learn library and their export to ONNX - Metatrader 5 
  13. Mastering ONNX: The Game-Changer for MQL5 Traders - Metatrader 5
  14. Regression models of the Scikit-learn Library and their export to ONNX - Metatrader 5

    CodeBase

    1. Information about the ONNX model's inputs and outputs - script for MetaTrader 5
    2. ONNX trader - expert for MetaTrader 5
    3. 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

      Python, ONNX and MetaTrader 5: Creating a RandomForest model with RobustScaler and PolynomialFeatures data preprocessing
      Python, ONNX and MetaTrader 5: Creating a RandomForest model with RobustScaler and PolynomialFeatures data preprocessing
      • www.mql5.com
      In this article, we will create a random forest model in Python, train the model, and save it as an ONNX pipeline with data preprocessing. After that we will use the model in the MetaTrader 5 terminal.
       

      Overcoming ONNX Integration Challenges

      ONNX (Open Neural Network Exchange) revolutionizes the way we make sophisticated AI-based mql5 programs. This new technology to MetaTrader 5 is the way forward to machine learning as it shows a lot of promise like no other for its purpose however, ONNX comes with a couple of challenges that can give you headaches if you have no clue how to solve them whatsoever.

      Overcoming ONNX Integration Challenges

      This article assumes you have a basic understanding of machine learning and AI theory, and that you have at least tried to use ONNX models in mql5 once or twice.

      Overcoming ONNX Integration Challenges
      Overcoming ONNX Integration Challenges
      • www.mql5.com
      ONNX is a great tool for integrating complex AI code between different platforms, it is a great tool that comes with some challenges that one must address to get the most out of it, In this article we discuss the common issues you might face and how to mitigate them.
      Reason: