In the restructured power systems, renewable energy sources (RES) have been developed. Uncertainties of these generators reduce the reliability and stability of power systems. The frequency and voltage for the correct operation of the power systems must always be maintained within a nominal value. Ancillary services (AS), energy storage systems (ESS), and demand response programs (DRPs) can be effective solutions for mentioned problems. Microgrids (MG) can make an improvement in their profits and efficiency by participating in various markets. This paper provides an optimal scheduling for the simultaneous participation of MGs in coupled active, reactive power and AS markets (regulation, spinning reserve and non-spinning reserve) by considering ESS, DRPs, call for deploying AS, and the uncertainties of wind and solar productions. Capability diagrams; mathematical equations are used to model active and reactive power of generation units. Risk management in this paper is done by the conditional value at risk (CVaR) method and probability distribution functions (PDF) are used for modeling uncertainties of wind speed and solar radiation. The ERCOT (Electric Reliability Council of Texas) market is simulated with real world data.