Discussing the article: "Deep Learning Forecast and ordering with Python and MetaTrader5 python package and ONNX model file."

 

Check out the new article: Deep Learning Forecast and ordering with Python and MetaTrader5 python package and ONNX model file.

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.

Now, leveraging the insights from the article 'How to Use ONNX Models in MQL5' by MetaQuotes, I am in the process of converting the model to ONNX format. Following the guidelines provided in the same article, I will integrate the resulting ONNX model into the base Expert Advisor (EA) to initiate trading operations. This approach allows for the seamless integration of machine learning models into the MQL5 environment, enhancing the capabilities of the trading algorithm.

Before formatting to ONNX, it is necessary to download the data. To achieve this, we will use the script I have uploaded (ticks_to_csv). Simply save it in the MQL5 EA folder, open it in the IDE, and compile it. Once done, add the script to a chart and let it run for some time (as it downloads all ticks for a symbol, it might take a while). In the journal, you will see a completion message when the process is finished. As a reference, I have used it for EUR/USD, and it has occupied several gigabytes.

Author: Javier Santiago Gaston De Iriarte Cabrera

 

Hi, sorry I made an error with the  DeepLearningForecast_ONNX_training.py file.

You will have to use this one

 
Javier Santiago Gaston De Iriarte Cabrera #:

Hi, sorry I made an error with the  DeepLearningForecast_ONNX_training.py file.

You will have to use this one

sorry, this one also has errors, I will make that py tomorrow and leave it here.


I'm also doing a continuation, you will have the correct py also in the continuation.

 
Javier Santiago Gaston De Iriarte Cabrera #:

sorry, this one also has errors, I will make that py tomorrow and leave it here.


I'm also doing a continuation, you will have the correct py also in the continuation.

Here is the .py, this is the one I will use in next article.

 
Javier Santiago Gaston De Iriarte Cabrera #:

Here is the .py, this is the one I will use in next article.

Sorry for n time. 

I forgot to drop some NaN

here is the final file (but, get it from the next article)

Reason: