Calculate this clientside. Create a nanoflow that (re)calculates TotalPrice, and add this nanoflow to the OnChange of both Quantity and Price.
Doing this clientside is by far faster and more responsive compared to using the backend because you avoid the roundtrip to the server.
Did it, thanks again Tim!
I did it with an attribute on OrderLine. Do you always need an attribute for this?