Download MetaTrader 5

Last trade on account

To add comments, please log in or register
Add our Twitter channel to friends and follow the news!
Gary Niemand
3884
Gary Niemand 2015.05.28 07:15 

Hi,

How do I check in MQL5 when my last trade happened on my account?

Sorry if it is a bit of a cheapass question.


Thanx

Alain Verleyen
Moderator
30702
Alain Verleyen 2015.05.28 08:12  
Gary Niemand:

Hi,

How do I check in MQL5 when my last trade happened on my account?

Sorry if it is a bit of a cheapass question.


Thanx

By checking the deals history. Please show your attempt if you want coding help.

Orders, Positions and Deals in MetaTrader 5
Orders, Positions and Deals in MetaTrader 5
  • 2011.02.01
  • MetaQuotes Software Corp.
  • www.mql5.com
Creating a robust trading robot cannot be done without an understanding of the mechanisms of the MetaTrader 5 trading system. The client terminal receives the information about the positions, orders, and deals from the trading server. To handle this data properly using the MQL5, it's necessary to have a good understanding of the interaction between the MQL5-program and the client terminal.
Gary Niemand
3884
Gary Niemand 2015.05.28 09:26  
Alain Verleyen:

By checking the deals history. Please show your attempt if you want coding help.

Thanx for the reply. I finally found that in the docs. Will they come back in time sequence?
Gary Niemand
3884
Gary Niemand 2015.05.28 09:54  

I would be a bit nervous to show my code. I'm an old mainframe COBOL programmer, so my MQL5 coding skills might scare a few people! :)

Alain Verleyen
Moderator
30702
Alain Verleyen 2015.05.28 12:49  
Gary Niemand:
Thanx for the reply. I finally found that in the docs. Will they come back in time sequence?
I don't know, probably better to not rely on that, check the date.
Gary Niemand:

I would be a bit nervous to show my code. I'm an old mainframe COBOL programmer, so my MQL5 coding skills might scare a few people! :)

I doubt you can surprise me ;-)
To add comments, please log in or register