Features of the mql5 language, subtleties and tricks - page 52

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
Please correct the code, the first function has number 5 instead of DealsNum. And the check for INT_MAX makes no sense
Thank you, I have corrected it. Checking for INT_MAX - if without input parameters, the Expert Advisor will not slow down and will not call the wasteful HistorySelect.
Orders in the history table are sorted by time of placement (not execution/cancellation). Take this into account when calling HistorySelect.
It would be good to add to this how things stand with trades and positions - to have a complete picture.
It would be good to add to this how the deals and positions are - to have a complete picture.
There is no way to deal with positions - they are not in the History. And with the deals unambiguously - there is only one time DEAL_TIME.
There is no way to deal with positions - they are not in the History. And with deals unambiguously - there is only one time DEAL_TIME.
Yes, but the positions are in the list of current.
Yes, but the positions are in the list of current ones.
Please clarify, I don't understand at all.
Please clarify, I don't understand it at all.
PositionsTotal() on a hedge account will return what? The number of positions. They are in some kind of list. And how are they sorted? That's what I'm talking about.
PositionsTotal() on a hedge account, what will it return? The number of positions. They are in some kind of list. And how are they sorted? This is what I'm talking about.
Got it. I haven't clarified this point for myself, because I haven't encountered a situation where it may be necessary.
During the first pass of the Agent job pack (for example, during a single tester run), the time between the start of the Expert Advisor and the first NewTick event may take several seconds. On the next passes of the pack this time is zero.
The last pass of the pack of tasks the Agent performs up to 10% longer than the previous ones.