1. Fix the stupid code: confused the 'Buy' and 'Sale'
2. Try to uptimize the code of computing tendaysflowin