In this paper, Stochastic synchronization of the Wind and Solar Energy Using Energy Storage system based on real-time pricing in the Day Ahead-Market Along with taking advantage of the potential of Demand Response programming, has been analyzed. Since renewables energies, loads and prices are uncertain, and planning is based on real-time pricing, the optimal biding proposition considers the wind power, solar system, and energy storage system. Uncertainty is addressed to solve the bidding strategy in a day-ahead market for optimal wind and PV power and optimal charging for energy storage. Batteries are the most promising device to compensate for the uctuations of wind and photovoltaic power plants to mitigate their uncertainty. In general, using MILP is a suitable approach to address uncertainty as long as a linear formulation is acceptable for modeling either with continuous variables or integer ones. By setting some scenarios to formulate market prices, imbalance of energy, wind and solar system, the uncertainty problems could be easily solved by MILP solver.The model created enables the retailer to realize the potentials of the demand response program and exploit high technical and economic advantages. To ensure fair prices, a set of regulating constraints is considered for sales prices imposed by the regulation committees. A model is presented to optimize the electricity trading strategy in the electricity market, considering the uncertainty in the wholesale market price and the demand level. The retailer considered in this paper is a distribution company that is the owner and operator of the networks and operates under real-time pricing regulations. To model demand response, the elasticity coe cient is used. The proposed solution is implemented on a standard 144-bus sample network using a nonlinear integer programming method. The presented method results provide helpful and valuable information based on the optimal method proposed by the retailers considering the Demand response program and real-time pricing (RTP) system.