MetaTrader 5 Python User Group - how to use Python in Metatrader - page 54
![MQL5 - Language of trade strategies built-in the MetaTrader 5 client terminal](https://c.mql5.com/i/registerlandings/logo-2.png)
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
Update to 5.0.27
Backup the script
Result
Can you tell me more about the timer?
I haven't looked into it myself, just a search
5.0.27 already has, all structure sequence (analog of named tuple for C API) added _asdict() method
mt5.symbol_info()._asdict() -big thnx, what we need.
history_deals_get doesn't seem to be in structure sequence ... heh.
Just badly missing a construct that will give the attribute names, in the correct order. If forhistory_deals_get_asdict() is not realizable or contradicts the concept - at least an analogue of _fields fromcollections.namedtuple (python), then we can pull the correct order of attributes, not manually in loop, but manually. So far it works out something like:
and the output:
Well, or noodlecode with loops.
Update to 5.0.27
Backup the script
Results
Sens!
Really comfortable in this part.
mt5.symbol_info()._asdict() -big thnx, that's it.
history_deals_get doesn't seem to fall into structure sequence ... heh.
Just badly missing a construct that will give the attribute names, in the correct order. If forhistory_deals_get_asdict() is not realizable or contradicts the concept - at least an analogue of _fields fromcollections.namedtuple (python), then we can pull the correct order of attributes, not manually in loop, but manually. So far it works out something like:
and the output:
Or noodle code with loops.
history_deals_get always returns a normal Python tuple with a collection of named TradeDeal inside it. In order to make it work, you need to access some index:
mt5.symbol_info()._asdict() -big thnx, what we need.
history_deals_get doesn't seem to fall into structure sequence ... heh.
Try it this way:
Result
history_deals_get always returns a normal Python tuple with a collection of named TradeDeal inside it. In order to make it work, we need to access some index:
Aha, thank you very much, I've already found this by analogy. Sens.
What if, in future releases, it will be possible not only to select named tuple with history_deals_get(and analogs), but also say list[_asdict()] will be just
fantastic. ;) Thanks.
Try it this way:
Result
Thank you! It's working.
Oh, and thank you for responding to :) suggestions to improve the lib.
Update to 5.0.27
Backup the script
Results
Afternoon.
Rashid, is there some kind of Product Update Announcement somewhere on the MetaTrader5 website?
I would like to know when and what changes have been implemented.
It is a bit difficult to plan the refactoring.
Good afternoon.
Rashid, is there a Product Update Announcement somewhere on the website?
So that you can keep track of what changes have been made and when.
It is a little difficult to plan the refactoring.
I am watching Pypi. Developers are waiting for comments from us for continuation/improvement. But so far we don't see any user activity in this area.
I think, we need to discuss in a separate branch the general infrastructure issues for the complex trading systems (terminal (MT4/МТ5) <-> TS (on different IPs) <_> different databases. Different configurations, problems, difficulties, advantages.
Good luck