Power suppliers in a dynamic power market can achieve full benefit by introducing a bidding strategy mechanism. In the power sector, renewable resources have significant gradual usage and their effect on the production of detailed bidding approaches is becoming further complicated in the industry. Due to the irregular nature of these renewable resources and because they are subject to several fluctuations, there is an inherent issue with generating electricity. Taking these considerations into account, attempts have been made to create a model of bidding strategy to optimize the benefit of the electricity producers using the oppositional gravitational search algorithm. The Weibull and Beta distribution functions are utilized to describe the stochastic characteristics of the wind-speed profile and solar-irradiation, respectively. For the IEEE-30 and IEEE-57 frameworks, the suggested method is being checked and explained. In comparison to other optimization approaches, the results of this approach were taken into account, and it was discovered that it outperformed other techniques in addressing bid difficulties. In addition, it is worth noting that the impact of renewable energy on the bidding strategy lowered market clearing and thermal power generating costs, and encouraged renewable influenced producers to put forward the excess electricity into the real-time market.