HistoryPositionInfo Version 2 - MetaTrader 5 Library - MT4/MT5 Resources
Version 1.0: Historical location information .
What's new in version 2:
The GetProfitInPoints function is still available, but it is recommended to use the new GetProfit function:
Boolean Get Profit ( Double & Profit Points, double & committee, Double & Swap, double &profit_currency);
In addition to the profit in pips, the GetProfit function returns the following information about the position: commissions, swaps and currency profits.
The CHistoryPositionInfo class is designed to obtain the pip profit, commission, swap and currency profit of a position based on the trading history.
Category Description
The CHistoryPositionInfo class allows to obtain the pip profit, commission, swap and currency profit of a position based on the trading history.
Classification method by group
Example of using the CHistoryPositionInfo class: Request five days of trading history, form an array of all found position identifiers, and then print the following information in a loop: Position profits based on trading history in pips, commissions, swaps and currency profits.
Attachment download
📎historypositioninfo.mqh (32.77 KB)
📎 testhistorypositioninfo.mq5 (5.99 KB)
Source: MQL5 #18721
💡 Featured Recommendations
✍️ Latest by the author
- •
- •
- •
- •
- •
- •
📌 Popular topics
- •
- •
- •
- •
- •
- •
- •
- •
🔗 You May Be Interested In
- •
- •
- •
- •
- •
- •