MetaTrader 5 Python User Group - как использовать Python в Метатрейдере - страница 60
Вы упускаете торговые возможности:
- Бесплатные приложения для трейдинга
- 8 000+ сигналов для копирования
- Экономические новости для анализа финансовых рынков
Регистрация
Вход
Вы принимаете политику сайта и условия использования
Если у вас нет учетной записи, зарегистрируйтесь
Вышла версия 5.0.30
Спасибо!
Вышла версия 5.0.31
Any Major changes?
No, just some fixes for https://www.mql5.com/en/forum/306742/page13#comment_15699363
https://pypi.org/project/pymt5adapter/
https://github.com/nicholishen/pymt5adapter
Thanks, this example I saw, it works.
I'm a little about something else.
positions_get - the list of TradePosition will be returned to me. In principle, you can throw in pandas and work fine.
But everything is not limited to one pandas, and if you need to get something like:
you have to somehow compose, pandas or for ... somehow a lot of extra body movements.
It has become much more convenient with _asdict (), if the one who writes is not a MQL5 prog, but let's say a pythonist ... or a datasynetist, then list / dict is
The basic elements of python, many are building a data transfer on list / dict.
Tuples are used, too often and a lot, but only if you need to tightly control the types of data that move in it.
and also hang an error handler, if not used or assigned properly. Well, somewhere ... :) I could be wrong.
Ok I completely agree with this sentiment now, and I also think that returning data as namedtuples instead of dictionaries is too opinionated for an API. I recently had issues with this design because it is impossible to pickle namedtuples. Consider the following concurrent trade copier script. Notice how much of a hassle it is to convert all the namedtuples to dictionaries in order to make use of the ProcessPoolExectutor?
trade_copier.py
terminal_config.json
It's especially difficult when there are namedtuples nested inside of namedtuple, such as the case with OrderSendResult.request. So you have to create unique conversion functions just to convert them back to pickleable datatypes. You could run everything through a recursive function to convert it back to native datatypes, but this is computationally expensive.
https://pypi.org/project/pymt5adapter/
https://github.com/nicholishen/pymt5adapter
Не удалось установить
Win10, Py3.6.10 and WinPy3.7.7.