Maximum Drawdown Calculation - By pips

Hi!
I’m running multiple strategies on one account and I want to have a drawdown statistics in Pips per strategy.

To be honest, I am very confused by the way to calculate this because there are many sources in the network.

Can someone explain to me simply what is the formula for calculating so that I can get a percentage result?

This is what I have found:

Let’s say that the earnings up to date are 9,841 pips.
the drawdown is 861 pips.
861/9841*100 = 8.74%

But there are many things that are not clear in what I have described above.
same as:

  1. What is the total number of pips to calculate? Should I sum up all the losses and all profits in pips?
    What if there are losses only?
  2. How can I find the Maximum Drawdown?

I dont want the calculation to be inside the code of the EA, I want to calculate it by a third party tool.

Thanks.