A trading strategy with variable investment from minimizing risk to profit ratio