tomele » Wed Jul 14, 2021 11:50 am wrote:Thank you for explaining the FileWrite function to me. However, I have written some ten thousand lines of MQL code and there has been one or another occasion of writing data to files. I would eventually manage to add some code to TDesk that writes CSV files containing the data you outlined.
But before I spend any time on this, I want to see some meat. Please outline your plan. What will you be doing with that CSV file? With regard to your thread title, which "machine" will "learn" what from it? I am not interested in buzz words, only in technical details.
Thanks in advance.
I don’t really know how to answer the question. In case you want concrete steps I can give you an overview: At first I would use the pandas library to import the data to use it with python. With python I can split the data into data that is used to train a model (which means the model will be trying to predict something by connections it saw in the train data), and into data which will be used to test how accurate the model can predict something (by using the r2 value, also called the “coefficient of determination”). That’s called a train-test-split.
An easy example would be having the following unrealistic data:
Signal, profit
80, 10
85, 20
90, 30
100, 50
There are many different models, in this case the simplest model, linear regression, would be obvious to use, which tries to draw a straight line through the data points to put simply.
If the train data would consist of the first three rows, the resulting model would predict the profit by following formula: y = 2*x – 150
Then the r2 value would be calculated by predicting that the profit at a signal of 100 would be 50, and conclude that our model is perfect since our test-data confirms that (-> r2 value = 1).
Obviously that’s a bad example just to explain how linear regression works (in two-dimensional space).
I guess my starting point would be to try out different models and comparing the resulting r2-values. Another interesting thing would be to test if the models get more accurate when leaving out certain data like an indicator. We could find out that a certain indicator brings no important additional information when used with others, or that we can predict best when using a certain subset of indicators used by SPB. In theory a more advanced model could even tell us that the EA “ABC” is always wrong with USDCAD at 5pm when another signal says buy EURCHF at the same time.
I don’t know if that answers your question, you can also write me a pm if you have additional questions or want to insult me for having to read all that
I want to add that the data would have to contain a “success” column to make any predictions, like profit resulting from a traded supersignal. That would be more difficult to add.