No, no, no... don't add one of these "inp..." things in Constants. And don't use == when you compare prices or money. Use anything else, but not ==.
10%, but 10% of what? Balance is the amount of money you had the last time you had 0 opened orders. Close all opened orders and the Balance is equal to Equity now. Do you really want to compare Balance with Equity?
10% sounds to me like such a small value that you should not reach it so quickly. If Equity can be less than 10% of the Balance, this EA is not good from the start.
If you mean 10% from some initial value... for example you can deposit 1000 dollars and you want to close everything when you reach 100 dollars, even if this is 6 months in the future... then the problem is that the EA can't really know what is that initial value that you had in mind half a year ago. There are ways to remember values for a while, but in this case maybe it's better to hard code the value in the EA
Otherwise you can try something like this:

Remember that here Equity and Balance are those global values that are result from all trades.
Or this one:

Here this block calculates the profit from the running orders only, it doesn't care about closed orders. AccountBalance() gives you the balance. This is function from MQL4. There is also AccountEquity() and other functions.
So, let's say the we have initial deposit of 1000 dollars. This is the Balance. Then we start losing and the block calculates that out profit is negative. The block would pass if the profit is < 20, because -1 * 1000 * (0.02) is 20. I made my tests and it was easier for me to close the trades when the loss was below 98% of the balance, that's why I used 98 there.
Note that the values used there have .0 at the end. Apparently, if you do it like this (100 - 98 / 100), the calculation will fail, because in MQL4 these numbers are integers and the final result is also integer. The result can't be 0.02, it will be 0. To get the result as floating point number, I wrote these numbers as floating numbers.