(MT5 coding) add up all deposits

 

1 full hour of reading threads and posts to no avail. All input is appreciated.

Q...How do I add up all Deposits into account via code?

 
I have idea for solution, where i take all profits from the balance to result in the total deposits, however, this seems a intensive way to get to what i want. Surely there is another way?
 

yes, that is page i was already analysing, so its great that you confirm that I am looking over the correct page. Thanks.