tradeprice is a function