Weights are rounded to 1 digit, so you won't get precisely 100 when you add them manually.

But you can easily calculate the weights in your script, sum them up, and check if the sum is 100. The weight of a long component is 100*(WinLong-LossLong)/(WinTotal-LossTotal).