The optical code division multiple access (OCDMA) technology has been developed to improve optical transmission, which is considered the next generation of optical fiber due to its advantages, providing that OCDMA has been joined to technique access by spectral amplitude coding (SAC), which can access several users simultaneously, reducing multiple access interference (MAI) and allowing asynchronous working and high security. The SAC-OCDMA system's development is based on constructing a novel code structure. A new proposed code structure depends on combining two matrices (enhanced double weight (EDW) and identity matrix), which has an advantage and can produce codewords simply and flexibly using a fixed weight. In addition, it is characterized by its ideal cross-correlation to eliminate MAI. The proposed code's performance is demonstrated using mathematical approaches and simulation. In this paper, three aspects are covered first: the proposed construction is discussed, and second, the proposed code algorithm's implementation is presented. Finally, the proposed code's performance is compared to that of other codes: random diagonal, multi-diagonal, modified double weight, and EDW according to the fiber length. The comparison was made for seven users using the OptiSystem simulation v.7. The proposed code achieved good performance in terms of bit error rate and longer transmission distance at 10 Gbps.