Structs for Position, Order and Deal

 


This article shows an example of how to use struct Person with DatabaseReadBind() function to fill an object from a database.

I want to do a similar thing but with Positions, Orders and Deals so I need structs for a Position, an Order and a Deal. Are these structs available in the standard library or do I need to write my own?

I can only find struct MqlTradeTransaction but it does not appear to handle all properties that can be returned by HistoryDealGet...(), and related functions.

SQLite: Native handling of SQL databases in MQL5
SQLite: Native handling of SQL databases in MQL5
  • www.mql5.com
The development of trading strategies is associated with handling large amounts of data. Now, you are able to work with databases using SQL queries based on SQLite directly in MQL5. An important feature of this engine is that the entire database is placed in a single file located on a user's PC.
 
Wojciech_R:SQLite/ Native handling of SQL databases in MQL5 - MQL5 Articles

This article shows an example of how to use struct Person with DatabaseReadBind() function to fill an object from a database. I want to do a similar thing but with Positions, Orders and Deals so I need structs for a Position, an Order and a Deal. Are these structs available in the standard library or do I need to write my own? I can only find struct MqlTradeTransaction but it does not appear to handle all properties that can be returned by HistoryDealGet...(), and related functions.

I suggest you read the documentation and analyse the source code for the Trade classes in the Standard Library.
Reason: