Calc account value for MT5
- Utilities
- Eugenio Bravetti
- Version: 20.729
- Updated: 30 July 2020
Script to calculate equity and balance at a specific date and time.
This script makes up for a lack of MetaTrader account history, that does not show how the balance and equity changes in time.
Balance calculation includes closed orders only.
Equity calculation includes orders closed before and orders that are still open at the specified time.
Example: date and time set to 2020/07/06 00:00. If I had a Buy 1 lot EURUSD position opened at price 1.12470 on the 2020/07/02, the program would calculate the PL that the position had at the date and time selected.
On 2020/07/06 00:00 EURUSD was 1.12397, and the PL was -0.00073 pips * $10/pip = -$73.