You can sell or buy item only by one kind, and then redo it all again. You repeat same steps 20x if you sell same items 20x (these that can not be stacked).

I think sell and buy UI should be changed for faster usability.