Why no HistoryPosition functions?
You must independently collect the "HISTORIC POSITION" from the "historical trades". I once wrote an example: Reconstruction of positions
- www.mql5.com
You must independently collect the "HISTORIC POSITION" from the "historical trades". I once wrote an example: Reconstruction of positions
Not sure why I didn't reply to this earlier. Thought I did. My apologies.
Needless to say, thanks for the answer, and for the code. That's pretty neat!
Seems kind of odd that we have to do this ourselves...? I'm confused as to why it isn't built in alongside all the others. But still, at least there's a solution one way or another.
Thanks again!
Hello all.
Short version:
I've read everything I can find on this. Particularly the MQL5 Reference > Trade Functions, and this awesome article (ORDERS, POSITIONS AND DEALS IN METATRADER 5).
We have Functions for active orders, active positions, history orders, and history deals.
Why don't we have any functions for history positions?
Thanks!
.
.
.
.
.
A little more detail (ignore this if you want, mostly just for interest and to be thorough):
So every combination of those is these six:
Except Active Deals doesn't make sense because a orders and positions have a start and end, a life over an interval of time, but a deal is a single event: a moment in time. No start and end, so never "active".
So we should have five: Active Orders and Positions, and History Orders, Deals, and Positions.
And in MQL5 we have comprehensive functions for four of those (Active Orders and Positions, History Orders and Deals).
Why no functions for History Positions?