How can I retrieve a list of trades with their corresponding realized profit/loss as executed at the broker programmatically?
I know I can manually export the orders and position history from the Order and Position tracker to a CSV file, but I would like to be able to do this programmatically.
So far I have looked in two directions:
1. Power Language: As far as I know the functions we can use to access positions and trades information executed at the broker are found here:
https://www.multicharts.com/trading-sof ... _Positions
But these functions only seem to get able to retrieve certain information about the currently open position, and not historical information about trades performed.
2. Analysis of logs: I've been trying to extract this information from the log files, but the information seems quite disperse and it is sometimes very difficult to relate a realized profit/loss to a particular previously open position or order.
Is there any other alternative? Or is there some way of accessing this information from a Power Language script that I am not aware of?
Many thanks!