TRADE FUNCTION COMPLETE, prob unstable