it's simple, record each trade with buying and selling price.

Do not sell everything.

I sell approx 90-95% and keep 5-10%.

It recovers principal and keep profit in coins.