the original (GAO 1996) NDWI is based reflectance for the wavelength of 0.86 (NIR) and 1.24 µm (SWIR). This corresponds to bands 2 and 5 if you use MODIS. The equation for MODIS is thus (b2-b5)/(b2+b5).
There are derived equation with other SWIR bands (e.g. for Landsat OLI the SWIR is around 1.6 µm), as well as NDWI2 (Mc Feeters 1996) which uses green (band 4 of MODIS) and NIR if you don't have SWIR bands.
MOD09GQ only provides bands for the red and NIR (the one you need for NDVI), but not the SWIR that is necessary for NDWI. Therefore you should use another product that includes band 5, such as MOD09GA. Note that the resolution of band 5 is 500 m, and so is MOD09GA.