The solar cells and photovoltaic (PV) modules are a key to clean electric power production that save the universe from warming contamination. It is fabricated using semiconductors that produce electric current under solar irradiance and metal contacts for system circuitry. The designing of the PV power system plant depends on estimating the parameters that accurately model the solar cells or PV modules. The commonly used model for representing the solar cell or PV module is the single diode model (SDM) because it is simpler than other models, contains only five unknown parameters, and has acceptable accuracy. This paper proposes a novel parameter estimation algorithm based on a discrete search to estimate the SDM parameters, called flexible alternate optimization (FAO). The proposed FAO algorithm performs an exhaustive search for a small set of the estimated parameters (called the decision set ( )). In contrast, the rest of the parameters are kept fixed. The number of parameters in the decision set flexibly controls the trade-off between algorithm complexity and parameter estimation accuracy to be applicable in wide applications. RTC France solar cell and monocrystalline SM55 module are used to validate the proposed method's effectiveness compared to the literature algorithms. The reached 9.55E-04 for RTC France solar cell and 0.034 for the PV module by varying the decision set size. A trade-off between the proposed algorithm complexity and the parameter estimation accuracy is presented for wide application uses. Future work is directed to enhance the parameter estimation accuracy and reduce the system complexity.