
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
The MQL5 documentation -> ONNX section -> "Creating Model" article offers the "ONNX.Price.Prediction" shared project for an example on how to use Machine Learning in MetaTrader5.
I tried running the project, but faced some problems:
- I noticed the code doesn't run with the library versions described in the docs (the docs instruct "pip install --upgrade tensorflow", etc.). tf2onnx library only support tensorflow==2.15.0 and below currently. And in order to install tensorflow==2.15.0, the python version shouldn't be above 3.9. I ran the code using python 3.9 and tensorflow==2.15.0.
- There seem to be three versions of the code inside the folder. Here is the project structure:
It's not noted what is their difference and which one of the three versions is the better one.
- In the "PricePrediction.py", when we get the final prediction at the end of the code, there is:
However, in "PricePrediction3.py", there is:
I'm confused on which one is correct. I tried "ONNX.Price.Prediction.Test3.mq5" but I got unexpected price predictions, sometimes negative values. Could it be that the "y_pred" is calculated wrongly?
- Are there other similar recommended projects? I need a simple yet standard code with basic Machine Learning implementation.