Machine learning in trading: theory, models, practice and algo-trading - page 2936

 
Renat Fatkhullin project ONNX.Price.Prediction in the section of common MetaEditor projects.

I didn't find such a thing. In the list of public projects with the letter O, I have only one project - your OpenCL.Seascape project

 
Aleksey Nikolayev #:

I couldn't find one. In the list of public projects with the letter O, I have only one project - your OpenCL.Seascape project

Now available:



Inside a simple model training in Python with model.onnx generation, Python inversion and inversion in MQL5.

In yesterday's MT5 beta we made a small error in the OnnxRun function, tomorrow we will fix it and post it.

 
Renat Fatkhullin #:

Now available:



Inside a simple model training in Python with model.onnx generation, Python inversion and inversion in MQL5.

In yesterday's MT5 beta we made a small error in the OnnxRun function, tomorrow we will fix it and upload it to you

As you said, it gives the error: failed, OnnxSetInputShape error 4024.

I don't understand where the model array is declared and defined. In the python file?

long handle=OnnxCreateFromBuffer(model);
 
Aleksey Nikolayev #:

As you said, it gives the error: failed, OnnxSetInputShape error 4024

I don't understand where the model array is declared and defined. In a python file?

Look in the logs - what version of ONNX API is defined:

2023.02.27 15:16:56.060 Scripts script ONNX.Price.Prediction (EURUSD,H1) loaded successfully
2023.02.27 15:16:56.107 ONNX    initialized [API version 1.14.0]

Put the latest version of ONNX Runtime 1.14 libraries from the archive (they are signed by Microsoft) in the root of the terminal next to the exe files and try again.

Now there is an error in parameter checking:

ONNX.Price.Prediction (EURUSD,H1)       failed, OnnxRun error 5807


Array model as short filename appeared automatically when you add resources to the project:


'ONNX.Price.Prediction.mqproj'
'model.onnx' as 'const uchar model[89590]'
'ONNX.Price.Prediction.mq5'
code generated
0 errors, 0 warnings, 151 msec elapsed
 
Renat Fatkhullin #:

Look in the logs - what version of the ONNX API is being defined:

Put the latest version of ONNX Runtime 1.14 libraries from the archive (they are signed by Microsoft) in the root of the terminal next to the exe files and try again.

Now there is an error in checking parameters:

Before copying the libraries from your archive was in the log:

2023.02.27 17:11:13.394 Scripts script ONNX.Price.Prediction (EURUSD,H1) loaded successfully
2023.02.27 17:11:13.500 ONNX    entry point 'OrtGetApiBase' not found

After copying the libraries in the log:

2023.02.27 17:18:26.805 Scripts script ONNX.Price.Prediction (EURUSD,H1) loaded successfully
2023.02.27 17:18:27.124 ONNX    initialized [API version 1.14.0]

and in the experts tab:

2023.02.27 17:18:27.151 ONNX.Price.Prediction (EURUSD,H1)       failed, OnnxRun error 5807
 
mytarmailS #:

The MO says close the shorts on the Jew and look for a buy...

There's a good chance of a rise for 2-3 days

Well, just like I ordered...

 
Renat Fatkhullin #:

It will be available in the mart, in the tester too, including Cloud Network.

ONNX Runtume will be rewritten and redesigned to not depend on outdated system libraries.

ONNX files are easily included in projects, encrypted and compressed inside EX5 files. You get clean robots from a single file.



Schema of operation:

  1. Train the model on the side, for example in Python
  2. Convert it to onnx
  3. Incorporate it into the robot and use it (trayning is not available, only inference)

I don't understand.
How do you poll the models? Right now I'm polling in Python TensorFlow, but here how?
 
Renat Fatkhullin #:

Now available:



Inside a simple model training in Python with model.onnx generation, Python inversion and inversion in MQL5.

In yesterday's MT5 beta we made a small error in the OnnxRun function, tomorrow we will fix it and upload it to you

Where are these projects? How to get into them?
 
Evgeny Dyuka #:
I'm confused.
How do you poll the models? Now I'm polling in Python TensorFlow, but here how?
Evgeny Dyuka #:
Where are these projects? How to get into them?

Go to the editor and look in the bottom pane "Public Projects", in it you will see "ONNX.Price.Prediction".

From the context menu on the project, click Join.


The project has both a training Python script and a ready model in model.onnx

To run the training, install Python (3.10 for example), deliver packages and click Compile directly in MetaEditor on the PricePredictionTraining.py file - the training will start.

python.exe -m pip install --upgrade pip
pip install --upgrade tensorflow
pip install --upgrade pandas
pip install --upgrade scikit-learn
pip install --upgrade matplotlib
pip install --upgrade tqdm
pip install --upgrade metatrader5
pip install --upgrade onnx==1.12
pip install --upgrade tf2onnx



You can run the prediction by running the PricePrediction.py file on compile:



For information, MetaEditor can:

  • compile C++ projects with Visual Studio installed
  • run Python programs

Compilers are configured in Tools -> Options -> Compilers:


 
Renat Fatkhullin #:

Go to the editor and look in the bottom pane for "Public Projects", in it you will see "ONNX.Price.Prediction".


Thanks, very interesting.
But I have SharedProjects empty, how do I populate it?