TheSnowGuru / PyTrader-python-mt4-mt5-trading-api-connector-drag-n-drop

Open Source Trading Strategies & End-to-End solution connecting Metatrader4 & Metatrader5 💹 with Python with a simple drag and drop EA. Fully tested bug free & efficient solution for live & paper trading⭐ Full Documentation ready. Lightweight, efficient and stable implementation 🔥
https://discord.gg/wRMUNP8ERa
699 stars 18 forks source link

Method Copy_rates_from issue #14

Closed araujocaio closed 2 years ago

araujocaio commented 3 years ago

Hi there,

I would like to report an issue with a method.

I have used successfully run the following code with ticks:

# request 1000 ticks from EURAUD
euraud_ticks = mt5.copy_ticks_from("EURAUD", datetime(2020,1,28,13), 1000, mt5.COPY_TICKS_ALL)
# request ticks from AUDUSD within 2019.04.01 13:00 - 2019.04.02 13:00
audusd_ticks = mt5.copy_ticks_range("AUDUSD", datetime(2020,1,27,13), datetime(2020,1,28,13), mt5.COPY_TICKS_ALL)

But when I use this for :

eurusd_rates = mt5.copy_rates_from("EURUSD", mt5.TIMEFRAME_H1, datetime(2020,1,28,13), 1000)

The same way is explained here:

https://www.mql5.com/en/docs/integration/python_metatrader5/mt5copyratesfrom_py

No matter what period, symbol, or timeframe, the object It returns is always "None" (not null).

Are you experiencing the same issue?

Thanks in advance

Branly76 commented 3 years ago

@araujocaio

Hi, You are using the API from MQL. This one I do not use. So I do not have this experience.

Or is the question if the same problem is with this API ?

BR