Download MetaTrader 5

OrderSelect() function for History Positions

To add comments, please log in or register
Mohammad Soubra
31398
Mohammad Soubra  

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 

Alain Verleyen
Moderator
33490
Alain Verleyen  

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
OrderSelect - Trade Functions - MQL4 Reference
  • docs.mql4.com
OrderSelect - Trade Functions - MQL4 Reference
Mohammad Soubra
31398
Mohammad Soubra  
Alain Verleyen:

You should read the documentation, third parameter :

Oh.....
Thank you Alain
you are the best
:)
To add comments, please log in or register