
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
Hello, I found a bug: copy_rates_range returns the wrong data - it should return OHLC bar data, but it returns tick data. I didn't know where to report it.
I used a sample code from the reference book with other dates and instrument:
and the output is:
MetaTrader5 package author: MetaQuotes Ltd.
MetaTrader5 package version: 5.0.4682
Выведем полученные данные как есть
(1704844800, 1.09291, 1.09291, 1.09262, 4607600487953426211, 6, 18, 0.)
(1704845100, 1.09284, 1.09285, 1.09237, 4607599271981526821, 19, 7, 0.)
(1704845400, 1.09263, 1.09284, 1.09263, 4607599587233500737, 15, 16, 0.)
(1704845700, 1.09257, 1.09288, 1.09257, 4607600487953426211, 8, 13, 0.)
(1704846000, 1.09283, 1.09287, 1.09283, 4607600532989422485, 64, 15, 0.)
(1704846300, 1.09285, 1.09286, 1.09265, 4607599992557467200, 17, 15, 0.)
(1704846600, 1.09273, 1.09286, 1.ТЬа09273, 4607600623061415032, 23, 19, 0.)
(1704846900, 1.09286, 1.09288, 1.09283, 4607600713133407580, 11, 17, 0.)
(1704847200, 1.09288, 1.09288, 1.09282, 4607600713133407580, 9, 13, 0.)
(1704847500, 1.09288, 1.09289, 1.09286, 4607600758169403853, 12, 11, 0.)
Выведем датафрейм с данными
time bid ask last volume time_msc flags volume_real
0 2024-01-10 00:00:00 1.09291 1.09291 1.09262 4607600487953426211 6 18 0.0
1 2024-01-10 00:05:00 1.09284 1.09285 1.09237 4607599271981526821 19 7 0.0
2 2024-01-10 00:10:00 1.09263 1.09284 1.09263 4607599587233500737 15 16 0.0
3 2024-01-10 00:15:00 1.09257 1.09288 1.09257 4607600487953426211 8 13 0.0
4 2024-01-10 00:20:00 1.09283 1.09287 1.09283 4607600532989422485 64 15 0.0
5 2024-01-10 00:25:00 1.09285 1.09286 1.09265 4607599992557467200 17 15 0.0
6 2024-01-10 00:30:00 1.09273 1.09286 1.09273 4607600623061415032 23 19 0.0
7 2024-01-10 00:35:00 1.09286 1.09288 1.09283 4607600713133407580 11 17 0.0
8 2024-01-10 00:40:00 1.09288 1.09288 1.09282 4607600713133407580 9 13 0.0
9 2024-01-10 00:45:00 1.09288 1.09289 1.09286 4607600758169403853 12 11 0.0
A was supposed to get a type of data like this:
MetaTrader5 package author: MetaQuotes Software Corp.
MetaTrader5 package version: 5.0.29
Выведем полученные данные как есть
(1578614400, 109.513, 109.527, 109.505, 109.521, 43, 2, 0)
(1578614700, 109.521, 109.549, 109.518, 109.543, 215, 8, 0)
(1578615000, 109.543, 109.543, 109.466, 109.505, 98, 10, 0)
(1578615300, 109.504, 109.534, 109.502, 109.517, 155, 8, 0)
(1578615600, 109.517, 109.539, 109.513, 109.527, 71, 4, 0)
(1578615900, 109.526, 109.537, 109.484, 109.52, 106, 9, 0)
(1578616200, 109.52, 109.524, 109.508, 109.51, 205, 7, 0)
(1578616500, 109.51, 109.51, 109.491, 109.496, 44, 8, 0)
(1578616800, 109.496, 109.509, 109.487, 109.5, 85, 5, 0)
(1578617100, 109.5, 109.504, 109.487, 109.489, 82, 7, 0)
Выведем датафрейм с данными
time open high low close tick_volume spread real_volume
0 2020-01-10 00:00:00 109.513 109.527 109.505 109.521 43 2 0
1 2020-01-10 00:05:00 109.521 109.549 109.518 109.543 215 8 0
2 2020-01-10 00:10:00 109.543 109.543 109.466 109.505 98 10 0
3 2020-01-10 00:15:00 109.504 109.534 109.502 109.517 155 8 0
4 2020-01-10 00:20:00 109.517 109.539 109.513 109.527 71 4 0
5 2020-01-10 00:25:00 109.526 109.537 109.484 109.520 106 9 0
6 2020-01-10 00:30:00 109.520 109.524 109.508 109.510 205 7 0
7 2020-01-10 00:35:00 109.510 109.510 109.491 109.496 44 8 0
8 2020-01-10 00:40:00 109.496 109.509 109.487 109.500 85 5 0
9 2020-01-10 00:45:00 109.500 109.504 109.487 109.489 82 7 0
I downgraded the MetaTrader5 library to version 5.0.4200 and it worked fine:
MetaTrader5 package author: MetaQuotes Ltd.
MetaTrader5 package version: 5.0.4200
Выведем полученные данные как есть
(1704844800, 1.09291, 1.09291, 1.09262, 1.09283, 6, 18, 0)
(1704845100, 1.09284, 1.09285, 1.09237, 1.09256, 19, 7, 0)
(1704845400, 1.09263, 1.09284, 1.09263, 1.09263, 15, 16, 0)
(1704845700, 1.09257, 1.09288, 1.09257, 1.09283, 8, 13, 0)
(1704846000, 1.09283, 1.09287, 1.09283, 1.09284, 64, 15, 0)
(1704846300, 1.09285, 1.09286, 1.09265, 1.09272, 17, 15, 0)
(1704846600, 1.09273, 1.09286, 1.09273, 1.09286, 23, 19, 0)
(1704846900, 1.09286, 1.09288, 1.09283, 1.09288, 11, 17, 0)
(1704847200, 1.09288, 1.09288, 1.09282, 1.09288, 9, 13, 0)
(1704847500, 1.09288, 1.09289, 1.09286, 1.09289, 12, 11, 0)
Выведем датафрейм с данными
time open high low close tick_volume spread real_volume
0 2024-01-10 00:00:00 1.09291 1.09291 1.09262 1.09283 6 18 0
1 2024-01-10 00:05:00 1.09284 1.09285 1.09237 1.09256 19 7 0
2 2024-01-10 00:10:00 1.09263 1.09284 1.09263 1.09263 15 16 0
3 2024-01-10 00:15:00 1.09257 1.09288 1.09257 1.09283 8 13 0
4 2024-01-10 00:20:00 1.09283 1.09287 1.09283 1.09284 64 15 0
5 2024-01-10 00:25:00 1.09285 1.09286 1.09265 1.09272 17 15 0
6 2024-01-10 00:30:00 1.09273 1.09286 1.09273 1.09286 23 19 0
7 2024-01-10 00:35:00 1.09286 1.09288 1.09283 1.09288 11 17 0
8 2024-01-10 00:40:00 1.09288 1.09288 1.09282 1.09288 9 13 0
9 2024-01-10 00:45:00 1.09288 1.09289 1.09286 1.09289 12 11 0
Same problem.
Data Science and ML (Part 32): Keeping your AI models updated, Online Learning
Developing a trading robot in Python (Part 3): Implementing a model-based trading algorithm
In the first article of the series, we loaded the dataset, placed labels, enriched the dataset and also performed dataset labeling. The second article was devoted to the creation and training of the model, as well as implementation of cross-validation and bagging.
Now that our model is trained and tested, it is time to start real trading using the MetaTrader 5 library for Python. This powerful library allows us to automate trading directly through Python using the functions and classes provided by the MetaTrader 5 platform.
Feature Engineering With Python And MQL5 (Part III): Angle Of Price (2) Polar Coordinates
Multiple Symbol Analysis With Python And MQL5 (Part 3): Triangular Exchange Rates
Financial markets are inherently noisy. It is common for traders to suffer unnecessary drawdowns caused by false trading signals that encouraged the trader to open his positions prematurely. There are many different trading strategies and principles that have been developed in light of this issue. Most of these axioms essentially teach the trader to wait before acting, and instead seek alternative sources of confirmation or additional signs of strength.
Hi
Can some guide me if iCustom indicator data of MQL can be fetched in Python.
My efforts to search online for solution did not helped much.
Thanks in advance.
My attempts to find a solution on the internet did not help much.
Thank you in advance.
You can't use standard tools.
You can't use standard tools.
Hi Aleksey
So what is the alternative way or non standard tool?
Hello Alexei.
So what is the alternative way or non-standard tool?
The simplest one - you can save the indicator data to a csv file and read it later from the required language.
The simplest one - you can save the indicator data to a csv file and read it later from the required language.
Thanks a lot, I thought about this too :)