MetaTrader 5 Python User Group - how to use Python in Metatrader - page 27

 
About python - recently talked about ranger (file manager) which is written in it. I've used it for a few days and my impressions are that it's a cool idea with interesting features, but python is really slow (if some complicated tasks are performed in the background). Ripped it off,I don't know why people like python so much. Putting a similar thing on C.
 
Vict:
About python - recently talked about ranger (file manager), which is written in it. Used it for a few days, got impressions - cool concept with interesting features, but python really lags (if some complex tasks are performed in the background). Ripped it off, I don't know why people are so attracted to python. Putting a similar thing on C.

Every tool has its own purpose.

Use mc ...

 
MetaQuotes Software Corp.:

Version 5.0.9 is available:

Thanks, ok.

 

Unclear behaviour when downloading quotes:

[2, 'MetaQuotes-Demo', '22911036']
[500, 2267, '09 Dec 2019']
rates = pd.DataFrame(MT5CopyRatesRange("EURUSD", MT5_TIMEFRAME_M15, datetime(2017, 1, 1), datetime(2020, 1, 1)), 
                     columns=['time', 'open', 'low', 'high', 'close', 'tick_volume', 'spread', 'real_volume'])
RuntimeError                              Traceback (most recent call last)
<ipython-input-13-4dc176d808cb> in <module>
----> 1 rates = pd.DataFrame(MT5CopyRatesRange("EURUSD", MT5_TIMEFRAME_M15, datetime(2017, 1, 1), datetime(2020, 1, 1)), 
      2                      columns=['time', 'open', 'low', 'high', 'close', 'tick_volume', 'spread', 'real_volume'])
      3 # leave only 'time' and 'close' columns
      4 rates = rates.drop(['open', 'low', 'high', 'tick_volume', 'spread', 'real_volume'], axis=1)
      5 rates = rates.set_index('time')

RuntimeError: Terminal: Invalid params

If uploaded from 2018, prices are uploaded and there is no error

History is available:


Found a solution, put "max bars in window" terminal Unlimited
 
Maxim Dmitrievsky:

Unclear behaviour when downloading quotes:

If uploaded from 2018, prices are uploaded and there is no error

History is available:


Found a solution, put "max bars in window" of the terminal Unlimited

For MT5CopyRatesXxx functions () we have specially added a note for such case

 
Rashid Umarov:

For the MT5CopyRatesXxx () functions we have specifically added a note for this case

super, thanks

 

It's written in the documentation:

Данные, полученные из терминала MetaTrader 5, имеют UTC-время.  

Error: the module seems to return data in server time, not in UTC. (MT5CopyRatesRange)

In general, terminal stores time in what timezone? UTC or server time or local time of the terminal?

 
Lyuk:

It's written in the documentation:

Error: the module seems to return data in server time, not in UTC. (MT5CopyRatesRange)

In general, terminal stores time in what timezone? UTC or server time or local time of the terminal?

The terminal server time is always returned, i.e. nothing needs to be corrected. The help would need to be updated.

The terminal stores in UTC+2 usually, by the clock in the "market overview" you can determine

 
Maxim Dmitrievsky:

The terminal servers always return in time, i.e. nothing needs to be corrected. The help would have to be updated.

The terminal stores in UTC+2 usually, you can tell from the clock in the "market overview"

This is inconvenient and wrong. Even just by looking in the terminal it is difficult to correlate the time there and somewhere else.

The local time is known , UTC is easy to calculate (I remember the offset) or to get. The server time on the other hand has to be found and compared to anything. What is the offset of the server time? The answer is usually +2, or watch. This is not convenient. In the terminal, too, I would like to set the time display (local, UTC, server time), it would be much more convenient.

And if the data from different terminals?

UTC is much better, we need to fix the functions , not the help.

 
Lyuk:

This is inconvenient and wrong. Even just by looking at the terminal it is difficult to relate the time there to somewhere else.

The local time is known, UTC is easy to calculate (I remember the offset) or get. The server time on the other hand has to be found and compared to anything. What is the offset of the server time? The answer is usually +2, or watch. Uncomfortable.

UTC is much better, need to fix the functions , not the help.

Maybe for some purposes inconvenient, for me so far for the current convenient: what I see in the terminal, I get in python, do not have to bring to another range

Reason: