Inspired by the human torso, humanoid robots usually equipped with active waist joints. For arbitrary walking patterns or whole body motions, the well-designed waist trajectories can greatly enhance the motion of robot legs and allow the robot to perform larger walking step length or crossing higher stair gaps. In this paper, we develop an effective online algorithm for generating waist and arm trajectories for humanoid robots having a waist joint. The waist trajectory generation problem is formulated into a Quadratic Programming problem. The Receding Horizon Control technique is used to make the algorithm relative faster to integrate it into online control systems and have the ability to confront perturbations. The arm swinging motion is then generated to eliminate the angular momentum generated by the swinging leg and the waist motion. Finally, we apply our algorithm on RENBO, which is the humanoid robot developed in our lab. The experimental result and analysis demonstrate that the algorithm can generate continuous and smooth waist and arm trajectory, making the resulting leg motion much smoother.