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

 
Aleksey Vyazmikin #:

I ran it from the terminal

The path was specified both ways to the terminal

He's looking in the wrong place. There's a history in the terminal.

Kill all terminals, leave one and you don't have to specify the path. It will find it by itself.

if not mt5.initialize():

But you write that the history of bars is missing.

Set it in the terminal settings

222


And EURUSD is definitely there, because I tried to load it from the terminal, where it is not in the market overview))))))

 
Aleksandr Slavskii #:

Kill all terminals, leave one and you don't have to specify the path. It will find it by itself.

But you write that you do not have enough bar history.

Set it in the terminal settings


The terminal is running alone.

I set unlimited in the terminal - it seems to have helped, but I had set it earlier - when I launched from python - there was no effect.

Also the connection with the MQ server is terrible - maybe it influenced somehow?

In general, it is not right that there is a dependence on the setting for displaying history on the chart.

Thanks.

 

Good afternoon everyone,to the esteemed author thank you for the article.

Newbie question:

The augmented sampled data from the "augment_data()" function is not used in training, judging from the above code?

I attach a picture with file sizes

 
alex42 #:

Good afternoon everyone,to the esteemed author thank you for the article.

Newbie question:

The augmented sampled data from the "augment_data()" function is not used in training, judging from the above code?

I attach a picture with file sizes

Thanks for the comment. Just noticed. Instead of this:

marked_data = markup_data(raw_data.copy(), 'close', 'label')

You need to insert this:

marked_data = markup_data(augmented_data, 'close', 'label')
 

Yevgeniy Koshtenko #:


Okay, thank you.

 

Dear author.

Please tell me the versions of python and modules used.


When running the script, an error pops up

Exception has occurred: UnicodeEncodeError
'ascii' codec can't encode characters in position 18-23: ordinal not in range(128)
  File "C:\Users\Степан\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Scripts\test2.py", line 326, in feature_engineering
    rfecv.fit(X, y)
  File "C:\Users\Степан\AppData\Roaming\MetaQuotes\Terminal\D0E8209F77C8CF37AD8BF550E51FF075\MQL5\Scripts\test2.py", line 338, in <module>
    labeled_data_engineered = feature_engineering(labeled_data_clustered, n_features_to_select=10)
UnicodeEncodeError: 'ascii' codec can't encode characters in position 18-23: ordinal not in range(128)




Files:
010101l.jpg  85 kb
 
raw_Prev_Day_Price_Change
raw_Prev_Week_Price_Change
raw_Prev_Week_Price_Change
Don't understand how should it work, I think we need daily time-frame before we calculate this or not? 
 
stenli21 #:

Dear author.

Please tell me the versions of python and modules used.


When running the script, an error pops up




You have no ansi in your path. Степан.
Try to install python for all users. That woul install python on c:\Program Files\python
Or something like that

Or install python on C:\python
Don't forget to change system path variable if needed
 
Andreas Kress #:
Your path is missing ansi. Stepan.
Try installing python for all users. This will install python in c:\Program Files\python
Or something like this

Or install python to C:\python.
Don't forget to change the system path variable if necessary

Thanks for the reply.

Yes, the problem was indeed due to paths with Russian letters. fixed it and everything worked.....