Machine learning in trading: theory, models, practice and algo-trading - page 2942
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Python scripts have long been able to be directly run in the terminal (not in the tester):
Information to broaden everyone's horizons:
Python scripts have long been able to be directly run in the terminal (not in the tester):
Information to broaden everyone's horizons:
You can run it, but how to pass the date itself, the same predictors to python, except through a file?
And then get any commands from it. For example, I want to sample the settings of the indicator, which is used to create predictors, and train the model in python.
It turns out that I need to create a sample through the Expert Advisor, then save it to a file, then somehow give a command to python to read the file. At the same time, the next start of the EA should occur only after the data processing by python. Then change the settings of the EA or the EA itself and run it again. How to do this?
You can run it, but how to pass the date itself, the same predictors to python, except through a file?
And then get any commands from it. For example, I want to go through the settings of the indicator, according to which predictors are created, and train the model in python.
It turns out that I need to create a sample through the Expert Advisor, then save it to a file, then somehow give a command to python to read the file. At the same time, the next start of the EA should occur only after the data processing by python. Then change the settings of the EA or the EA itself and run it again. How to do this?
The set of functions for accessing charts/ticks/trading positions/trade history is given above. It is enough for direct work of Python scripts.
Perhaps we will add access to indicators.
Couldn't install this package.
I installed the onnx package without specifying the version. Everything worked - the model was trained and started. Python version 3.11.2
The set of functions for access to charts/ticks/trading positions/transaction history is given above. It is enough for direct work of python scripts.
Perhaps, we will add access to indicators.
I have described the situation I need to solve. If only prices and all transformations in python are enough for you, how does such a concept imply the use of model transfer at all? Do you propose to duplicate logic for python and terminal?
Obviously, you need a bridge to work with data, and now it is only possible through a file, but then synchronisation is only through files again, which is fraught with problems.
I installed the onnx package without specifying the version. Everything worked - the model was trained and started. Python version 3.11.2
The model runs in mql5 script, but it does not run in python, because the onnxruntime package is not installed.
Au, python fans, without you there is no way.
I described the situation I need to solve. If all you need is price and all the conversions in python,
I think you're being really stupid somewhere...
Where?
And where's that?
The input is just price data. Processing them in one place, not in different places. In the terminal and in training packages it is not quite right. Historically, of course, it is more convenient to take what is processed in the terminal into training packages with prices, but this is a dead-end way. Indicators are of course convenient with their pre-calculation, not recalculation, but it seems to be even set in the task.
In general, the place where the primary data are received and the trading environment is managed is not right to use for calculations.
The input is just price data. Processing them in one place, not in different places. In the terminal and in training packages it is not quite right. Historically, of course, it is more convenient to take what is processed in the terminal into training packages with prices, but this is a dead-end way. Indicators are of course convenient with their pre-calculation, not recalculation, but it seems to be even set in the task.
In general, the place where the primary data are received and the trading environment is managed is not right to use for calculations.
How to do it correctly is a different question. I'm still about how feasible - i.e. connect the trained model, but how to do preprocessing then. It is assumed that there is no python after exporting the model.