You should read the documentation, third parameter :
pool=MODE_TRADES
[in] Optional order pool index. Used when the selected parameter is SELECT_BY_POS. It can be any of the following values:
MODE_TRADES (default)- order selected from trading pool(opened and pending orders),
MODE_HISTORY - order selected from history pool (closed and canceled order).
OrderSelect - Trade Functions - MQL4 Reference
- docs.mql4.com
OrderSelect - Trade Functions - MQL4 Reference
Oh.....
Thank you Alain
you are the best
:)
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
Hi
:)
as you see below
I need a code that can select the history positions
the OrderSelect() function is only selecting the current active trades...
Thanks for all