calculating tailing stop