Download MetaTrader 5

Order History

To add comments, please log in or register
Any problems with the code? Find solution in documentation!
Samuel Ogden
228
Samuel Ogden 2014.07.31 15:50 

I need to find out whether the last closed order was a short or long position for a specific symbol, is this possible? 

If so please could you point me in the right direction with some of the functions I will need

Thanks.

Alain Verleyen
Moderator
30737
Alain Verleyen 2014.07.31 16:50  

Yes. Loop through the Order's history to find the last one and check if it's a short or a long.

Samuel Ogden
228
Samuel Ogden 2014.07.31 18:11  

Oh wow, how did I not see that -_- 

Cheers mate!  

whroeder1
14514
whroeder1 2014.08.01 12:13  
angevoyageur: Loop through the Order's history to find the last one and check if it's a short or a long.
See also Could EA Really Live By Order_History Alone? - MQL4 forum
To add comments, please log in or register