The optimal allocation and sizing of distributed generation (DG) resources are important in installing these resources, to improve the technical parameters of the network, including the power losses, voltage profile, and short-circuit level, as well as to increase economic factors. In this paper, a new multi-criteria algorithm and objective function are proposed for the optimal sizing and allocation of renewable and non-renewable DG resources simultaneously. The proposed algorithm is implemented on 63/20 kV substations at 20 kV levels. In the proposed objective function, all important technical and economic factors as well as important constraints, such as penetration level of DGs and budget constraint, are considered in a way that all factors are assigned to monetary values. Moreover, a new mathematical formulation is introduced for the allocation of renewable DG resources to reduce run-time optimization. The genetic algorithm (GA) is employed in the proposed algorithm to minimize the objective function. For renewable DG resources, photovoltaic panels and wind turbines, and for non-renewable DG resources, gas turbines are considered. The 115 buses network of Bakhtar Regional Electric Company (BREC) in Iran is used to evaluate the performance of the proposed algorithm. The results demonstrate that the proposed algorithm improves technical factors efficiently and maximizes the profitability of the investment.