functions both mine and others to be used for pair tading