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

 
Renat Fatkhullin #:

Python scripts have long been able to be directly run in the terminal (not in the tester):


Information to broaden everyone's horizons:

and you really can )) awesome
 
Renat Fatkhullin #:

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?

 
Aleksey Vyazmikin #:

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.

 
Aleksey Nikolayev #:

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

 
Renat Fatkhullin #:

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.

 
Aleksey Nikolayev #:

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.

 
Aleksey Vyazmikin #:

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...


 
mytarmailS #:
I think you're being really stupid somewhere...


Where?

 
Aleksey Vyazmikin #:

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.

 
Valeriy Yastremskiy #:

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.

Reason: