According to the signal-to-noise ratio (SNR) loss of average algorithms in direct P-code acquisition method, this paper analyzes the SNR performance of the overlap average algorithm quantitatively, and derives the relationship of SNR loss with overlap shift value and initial average phase difference in the overlap average algorithm. On this basis, the bidirectional overlap average algorithm based on optimal correlation SNR is proposed. The algorithm maintains SNR consistent in the entire initial average phase difference space, and has a better SNR performance than the overlap average algorithm. The effectiveness of the algorithm is verified by both theoretical analysis and simulation results. The SNR performance of the bidirectional overlap average algorithm is 5 dB better than that of the direct average algorithm, and 2 dB better than that of the overlap average algorithm, which provides the support for direct P-code acquisition in low SNR.