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

 

Aleksey Terentev I also settled on Keras. Two questions. What backend do you use for Keras? How are you going to connect it to MT? I am using Tensorflow backend. For MT I am writing DLL in C++ to use trained model. But to get C++ library with header files for Tensorflow is not trivial. There is no C++ library for Kuras at all.

 
Grigoriy Chaunin:

Aleksey Terentev I also settled on Keras. Two questions. What backend do you use for Keras? How are you going to connect it to MT? I am using Tensorflow backend. For MT I am writing DLL in C++ to use trained model. But to get C++ library with header files for Tensorflow is not trivial. There is no C++ library for Kuras.

I haven't changed the backend yet. The default is Tensorflow. Rumor has it that it learns faster on Teano. But I had problems when installing it on Windows, moreover on Anaconda.

With MT4 I use my ML-Assistant utility. It is designed to work with classification. For trading my own utility as well, with the function of "virtual trading" on the chart, I may publish it later.
I support ML-Assistant. I am preparing the next version. I made it especially for convenient work with external tools, quick tests and debugging of MO models.

PS. Happy new year of the dog! =)

 
Aleksey Terentev:


With MT4 I use my ML-Assistant utility. It is designed for working with classification. For trading also its own tool with function of "virtual trade" on the chart, I will publish it later.
I support ML-Assistant. I am preparing the next version. I made it especially for the convenience of external tools, quick tests and debugging of МО models.


Extremely curious thing. I wanted a concrete example for R - running any MO algorithm, for example, one of the simplest - random forest (rf).

 
SanSanych Fomenko:

Extremely curious thing. I wanted a concrete example for R - running any MO algorithm, for example, one of the simplest is random forest (rf).

Unfortunately for you, I myself work in Python.
But I can describe the principle of preparing the script:
1. When you launch an external script, the utility passes the launch parameters: ToolTimeframe + parameters specified in train/predict.
That means the script may be universal by tool and timeframe.
2. You should specify in the script only path to csv files location. For example: "@MT4@/mql4/files/ml-assistant" + parameters[0] + "_x.csv".
3. Postfixes to default files "_x.csv" + "_y.csv" (train) and "_xx.csv" -> "_yyy.csv" (predict)

4. Read parameters, read data from files - all dataset is ready.
5. You train, make forecasts, save forecast file (with "_yyy.csv" postfix).
6. The ml-assistant utility reads your forecast and displays it on the chart.

When I update it with the next version I will change my blog post, I will try to make description a bit more transparent. Also, you can help with examples in R, I will add code to make it easier for others to get started.

Here are examples of my scripts in Python.

 
Grigoriy Chaunin:

By the way, here is the link. I took many solutions for Keras from there.

Start Here With Machine Learning
Start Here With Machine Learning
  • machinelearningmastery.com
Your guide to getting started and getting good at applied machine learning with Machine Learning Mastery.
 
Aleksey Terentev:
Here you can also meet bazaar babushkas who are just scratching their tongues.

Smart people give you the keyshttps://cran.r-project.org/web/packages/PSF/vignettes/PSF_vignette.html, and you have no clue from the word "at all"...

Introduction to Pattern Sequence based Forecasting (PSF) algorithm
  • Neeraj Bokde, Gualberto Asencio-Cortes and Francisco Martinez-Alvarez
  • cran.r-project.org
This section discusses about the examples to introduce the use of the PSF package and to compare it with auto.arima() and ets() functions, which are well accepted functions in the R community working over time series forecasting techniques. The data used in this example are ’nottem’ and ’sunspots’ which are the standard time series dataset...
 

As for the lack of ready indicators and Expert Advisors on NS. I did not put my latest work in the public domain and will not.

By the way, about adding NS to MT. I'm thinking about bolting Python to MT. I'm thinking about bolting it to MT. It's designed to do that, but is it really necessary? The point is that Python has a lot of ready-made libraries.

 

Aleksey Terentev Thanks for the link.

 
Grigoriy Chaunin:

As for the lack of ready indicators and Expert Advisors on NS. I did not put my latest work in the public domain and will not.

By the way, about adding NS to MT. I'm thinking about bolting Python to MT. I'm thinking about bolting Python to MT. It's designed to do that, but is it really necessary? The point is that in Python is a lot of ready-made libraries.


You can just call the Python script through win api if you need to calculate something, then dump the result into a file and let the bot read it... no big deal :) In general, you can do all the logic in python and only get signals in MT

I don't know how fast it will be to periodically restart the script

 

I think if you connect Python properly, through the DLL will be faster. I've decided to write a header file in MQL5 to connect Python. I have decided to write a header file in MQL5 to connect Python. I will post the code on Git Hub.