Difference between Deals & Orders

 

Hi Coders!

I'm working on to develop my own functions (DealsTrack(), GetVolume(), etc.) for my Expert Advisors.

Could somebody explain me the difference between the functions of the Deals (Ticket) and the Order (Ticket)? In MT4 there's only Order Ticket - it's clear.

If I see the Orders/Deals History, the rows of them are almost same. So when or what for do I have to use the Orders and Deals?

Thank you in advance!

Relative

Documentation on MQL5: Trade Functions / OrderGetTicket
  • www.mql5.com
Trade Functions / OrderGetTicket - Documentation on MQL5
 
Relative:

Hi Coders!

I'm working on to develop my own functions (DealsTrack(), GetVolume(), etc.) for my Expert Advisors.

Could somebody explain me the difference between the functions of the Deals (Ticket) and the Order (Ticket)? In MT4 there's only Order Ticket - it's clear.

If I see the Orders/Deals History, the rows of them are almost same. So when or what for do I have to use the Orders and Deals?

Thank you in advance!

Relative

Simplistic instant market trade answer.  Trade request is generated manually or by Expert Advisor. Request in MT-5 Client Terminal becomes an Order sent to Broker's server. if successful, Order on Broker's server generates a Deal that is sent to Broker's Forex Market connection. If Deal is accepted, then MT-5 Client Terminal opens a Position to hold the trade data. Orders have market stops that are stored on Broker's Server. Deals have the generic trade data, without market stops.
 

Thank you Wackena!

Now, it's clear.

Reason: