MetaTrader 5 Python User Group - how to use Python in Metatrader - page 21
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
https://www.mql5.com/ru/docs/integration/python_metatrader5/mt5copyratesrange_py
The example uses a different function, a mistake:
# obtain bars with USDJPY M5 from 01.04.2019 in UTC timezone
rates=MT5CopyRatesFrom("USDJPY",MT5_TIMEFRAME_M5,utc_from, utc_to)
expected: MT5CopyRatesRange()
To convert the datetime to a specific timezone, the help suggests using datetime UTC
However, this does not affect anything. When setting any timezone, the terminal time is taken (in my case it is GMT+2)
What is the build number?
pip install --upgrade MetaTrader5
Requirement already up-to-date: MetaTrader5 in c:\works\mt_websocket_server\.env\lib\site-packages (5.0.8)
Can we move it all to one place?
Which is it? The whole discussion thread?
Which is it? The whole discussion thread?
Yeah, to get the whole python thing in one place.
The moderators will move it.
Yeah, to have everything about python in one place.
Moderators will move it.
Forum on trading, automated trading systems and trading strategy testing
MetaTrader5 python lib and MT5CopyRatesFrom - weirdness or bug?
Dmitry Prokopyev, 2019.11.30 10:59
Hi all.
Came across this weirdness in data returned by MT5CopyRatesRange and other functions.
Everything is trivial, but the output we have:
I want to draw your attention to:
MT5Rate(time=datetime.datetime(2018,4, 3, 16, 0), open=1.22957, low=1.22989, high=1.22557, close=1.2258, tick_volume=11956, spread=1, real_volume=0)
go to the terminal, see low/hight for this frame:
We see thatlow=1.22557,high=1.22989
Question is this a bug or are keys for the MT5Rate somehow configurable?