The exit price is the price at which your position gets closed, if you call it at market price then use the price at which your position got sold otherwise use the price at which your TP/SL is placed.
If you want to calculate it continuously and are too disturbed by the name exit price, then this resource might help you understand using a different naming approach.