Discussing the article: "Developing a robot in Python and MQL5 (Part 1): Data preprocessing" - page 5

 
Rashid Umarov #:

Judging by the screen, Python version 3.10.10 was used.


Oh, man. Right.

I have a slightly different approach to reading articles.

I read an article diagonally first. If it interests me, I download and run the code. If the code works, then I read the article carefully.

I didn't see the python version diagonally).


ZЫ. I have python not 3.10 for sure.

P.S. When downloading from the meta-editor.

offers to download python-3.9.7-amd64.exe.

This is obviously not 3.10 where to download 3.10?

 

https://www.python.org - it's there.

Most likely you can put the latest version 3.12

Welcome to Python.org
Welcome to Python.org
  • 2024.03.29
  • www.python.org
The official home of the Python Programming Language
 
Yuriy Bykov #:

https://www.python.org - it's there.

Most likely you can put the latest version 3.12

Python 3.12.2 (tags/v3.12.2:6 abddd9, Feb  6 2024, 21:26:36) [MSC v.1937 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license()" for more information.

= RESTART: C:\Users\Iskander\Desktop\synergy_ml_bot.py
MetaTrader initialization failed
MetaTrader initialization failed
Traceback (most recent call last):
  File "C:\Users\Isrander\Desktop\synergy_ml_bot.py", line 272, in <module>
    augmented_data = augment_data(raw_data)
  File "C:\Users\Isrander\Desktop\synergy_ml_bot.py", line 95, in augment_data
    print(f"Number of rows before augmentation: {len(raw_data)}")
TypeError: object of type 'NoneType' has no len()

Python n/b

I've installed everything I can. Still, something is missing. Python n/b!!!

 

Run the example from the Python integration help first

If it doesn't work, the problem is on your side

Документация по MQL5: Python интеграция
Документация по MQL5: Python интеграция
  • www.mql5.com
MQL5 предназначен для разработки высокопроизводительных торговых приложений на финансовых рынках и не имеет аналогов среди других специализованных...
 
Rashid Umarov #:

Run the example from the Python Integration Help for starters

If it doesn't work, the problem is on your side

It's fine. It worked.

The author specified his paths to the terminal in the code. I didn't figure it out at once.

Thank you all for your help.

python n/b.

 
Aleksandr Slavskii #:
The author specified his paths to the terminal in the code. Didn't figure it out right away.

Didn't want to make that assumption so as not to offend you :)

From now on, check your source before you reproach me

 
Rashid Umarov #:

Didn't mean to make that assumption so as not to offend you :)

Henceforth, check your source before rebuking

You have misunderstood the essence of my rebuke.

The problem was not " The author specified his own paths to the terminal in the code", it took almost no time at all.

The problem was that the author did not specify "simple", "absolutely clear to everyone" things in the article in a forum specialised in the MQL language.

Like these in the help.


It is not difficult for a person who knows python to write such instructions in an article, but it would save a lot of time for someone who knows little about python.

Finding out the version of python, installing it, installing packages that are installed in the wrong way. First it says that your version of python is outdated, and then it says that the version of the package does not fit the new version of python, install this one.

Dancing...

And in general, python is n/b.

 

I don't understand python very well, but I got this feeling:

1. Predictors use the closing price at the time of prediction at the zero bar, i.e. the future price.

2. Predictors are transformed and dropped on the whole sample, without selecting a sample for independent testing.

3. Sample generation is a questionable idea - I would like to see evidence of the usefulness of the approach used.

4. It is not clear about clustering - how columns (attributes) are clustered I quote "Clustering of attributes combines similar attributes into groups in order to reduce their number. This helps to get rid of redundant data, reduce correlation and simplify the model without overfitting." I somehow think that clustering combines rows (vectors) with similar predictor values (in columns). Otherwise, the code should output the numbers of columns divided by clusters. In general, the whole paragraph is confusing in the article about clustering in the beginning about one method, then you apply another one, I think it is difficult for a reader who is not knowledgeable to understand, and I did not understand why.

5. The issue of predictor selection is important, and I was interested in the RFECV method, but I would like to see in the article an explanation of how trees are built without a target, but the "accuracy" metric is used for evaluation, I mean this statement "...First the class labels are discarded...". It seems that the logic of the text doesn't match the logic of the code, as the training goes by the labels "rfecv.fit(X, y)".

The article makes me feel that the text is partially either generated by a linguistic model, or it is machine translation, or I have completely stopped understanding modern language...

I would like to see better quality articles with unique content. I hope the author will have them.

 

# Add noise
noisy_data = raw_data.copy()
noisy_data += np.random.normal(0, noise_level, noisy_data.shape)

Does this artificial series look like a real one ? OHLC bars are also not generated. They should be collected from ticks as it seems to me.
And such artificially generated data are good to use for a forward as one of the criteria for checking for looking into the future, etc., but certainly not as a predictor.
 
Aleksey Vyazmikin predictor selection is important, and I was interested in the RFECV method, but I would like to see in the article an explanation of how trees are built without a target, but the "accuracy" metric is used for evaluation, I mean this statement "...First the class labels are discarded...". It seems that the logic of the text doesn't match the logic of the code, as the training goes by the labels "rfecv.fit(X, y)".

The article makes me feel that the text is partially either generated by a linguistic model, or it is machine translation, or I have completely stopped understanding modern language...

I would like to see better quality articles with unique content. I hope the author will have them.

If class labels are not reset, then the best feature for predicting labels will be the labels themselves, no?