The methods used below are internal to the automated trading software I use, I hope it's not too confusing. I've tried to comment below as much as possible. Basically the script Enters a stock...