MatLab integration for trades