mtapi icon indicating copy to clipboard operation
mtapi copied to clipboard

How to get history profit record?

Open michealChin opened this issue 6 years ago • 1 comments

Hi,

I would like to know how to get the history profit record that I have made in the pass. I have try the example MtApi5TestClient but it seems only return the active trade profit which is zero if currently you don't have any active trade. Any help will be much appreciated.

Thanks!

michealChin avatar May 30 '19 06:05 michealChin

If I understood you correct you can use function HistoryDealGetDouble with argument ENUM_DEAL_PROPERTY_DOUBLE.DEAL_PROFIT to get information about profit of position. You need to call function HistorySelect(from_date,to_date).

Please try to to find related solution on MQL language and than you can use the same functionality in MtApi.

vdemydiuk avatar Nov 11 '19 11:11 vdemydiuk