The power produced from PV panel and wind turbine generators are based on weather condition, as a result this system is unreliable. The hybridization of this system with another source such as batteries or diesel generator increases significantly the reliability of the whole system. This paper recommends an optimization method of hybrid solar-wind battery systems based on BSA (Backtracking Search Algorithm) algorithm, following its steps the BSA algorithm attains the global optimum with reasonable time and presents a good results comparing with other algorithm (Genetic Algorithm). The decision variables have included in the optimization process are the number of PV module, the number of wind turbines and the number of batteries.