Discussion of article "Library for easy and quick development of MetaTrader programs (part II). Collection of historical orders and deals"
Good article. It's very detailed. Even beginners can understand it, everything is step by step with pictures.
Thank you. I try to make it clear for everyone.
Yes, the articles are excellent and well described.
I even have artefacts to remember)
Article #1 = mug
Article #2 = pot
Since there will be a series of articles, I won't buy a new mug for boiling water for tea yet, I'll clean the pot and keep using it).
Yes, the articles are excellent and well described.
I even have artefacts to remember)
Article #1 = mug
Article #2 = pot
Since there will be a series of articles, I won't buy a new mug for boiling water for tea just yet, I'll clean the pot and keep using it).
Thanks. Vitaly, I have a lot of goodies and interesting things ready in the third article, so I can send you a set of mugs and pots ![]()
Thank you. Vitaly, I have a lot of goodies and interesting things ready in the third article, so I can send you a set of mugs and pans
Well done.
You're doing good.
It's a shame. I haven't seen the first article yet. But I will. I can see where you disappeared to. I guess I'm the one who's missing. That would be more accurate
Good for you.
You're doing good.
It's a shame. I haven't seen the first article yet. But I will. I can see where you've been missing. I guess I'm the one who's missing. That would be more accurate
...
Oh, we've got a lot of people coming round. Wow! I'm glad you didn't forget the road to our place.)
In fact, it's an example of how not to program (we're not talking about functionality, but about implementation): everything is stuffed into the base class, a lot of flags and plugs are made in the inheritors to determine what is supported where, a sheet of copypastes.... Antipatterns. It's clear that it's all "live", but it already pretends to be a complete redesign, if well.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
New article Library for easy and quick development of MetaTrader programs (part II). Collection of historical orders and deals has been published:
In the first part, we started creating a large cross-platform library simplifying the development of programs for MetaTrader 5 and MetaTrader 4 platforms. We created the COrder abstract object which is a base object for storing data on history orders and deals, as well as on market orders and positions. Now we will develop all the necessary objects for storing account history data in collections.
Collection of historical orders and deals
It is always helpful to have the account history at hand. The terminal provides it and gives the tools to get it in programs. However, our current tasks require a custom list we are able to sort and re-arrange to return necessary data to our programs. This means the change of the previous account history status should be checked at each tick. If a change is detected, the list of historical orders and deals is to be recalculated. But sorting the entire history at each tick is too resource-intensive. Therefore, we will only make additions to our list of new data, while previous data is already stored in the list.
Let's create the new class CHistoryCollection in the Collections folder:
Right-click on the Collections folder, select "New File", select "New Class" in MQL Wizard window and click Next. Enter CHistoryCollection class name, leave the base class field blank and click Finish.
Author: Artyom Trishkin