strategy: fix bug that can not calculate max/min profit correctly

There was a bug that can not calculate max/min profit correctly, fix it.

Signed-off-by: Zhengwang Ruan <ruan.zhengwang@gmail.com>