Download MetaTrader 5

Order History

To add comments, please log in or register
Samuel Ogden
228
Samuel Ogden  

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
33777
Alain Verleyen  

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  

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

Cheers mate!  

whroeder1
16509
whroeder1  
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