Recently, the penetration of renewable energy sources (RESs) and electric vehicles (EVs), has increased significantly in the power system. These resources bring many advantages to the environment; however, due to their small capacity, they cannot participate in the electricity market in a standalone manner. Furthermore, RESs and EVs have high stochastic behavior, that impose considerable uncertainty in RESs generation and EVs behavior profiles. These challenges can be addressed using the virtual power plant (VPP) concept. In this paper, an optimal bidding strategy is presented for VPP to participate in energy and spinning reserve markets. The uncertainties in the stochastic parameters of this system, including those related to the load demand, electricity prices, and wind speed, are handled using a deep learning approach based on bi-directional long short-term memory (BLSTM) networks. A BLSTM network uses the information from complete temporal horizon, accounting for previous and future features, and thus provides an accurate estimate of stochastic parameters. The numerical results confirmed that the BLSTM network outperformed the other methods and can forecast the stochastic parameters with only 3.56% and 3.53% errors in VPP profit when VPP participates in the only day-ahead energy market and both day-ahead energy and spinning reserve markets, respectively.