High dynamic and precise control of process variables within permissible limits is the key to high product quality in the injection molding industry. Among these variables, the injection flow rate of molten polymer is particularly significant. In this paper, an effective optimal open-loop and state feedback controller design method is designed to realize the optimal tracking control of the melt polymer flow front position flow of melt polymer fluid during injection molding. To this end, the dynamic model of the filling process is firstly established, taking into account the nonlinearity of hydraulic control system and the effect of molten polymer flow on the dynamics of the injection ram, and then the dynamic optimal tracking control problem of flow front position of molten polymer in injection molding machine is proposed. Then, an open-loop controller and a multi-level feedback control law are well designed, wherein the control signal and the control feedback kernels are parameterized by control parameterization. The controller design problems are transformed into sequential optimal parameter decision problems. The explicit expressions of the gradient information of the objective function and constraints on the parameters of the decision variables are solved by using the state sensitivity equation analysis method, and the gradient information is combined with the nonlinear programming algorithm to solve the optimization problems efficiently. Finally, the viability and effectiveness of the proposed design method are verified by numerical simulations.