Immune and stromal cells contribute to glioma progression by infiltrating the tumor microenvironment. We used clinical characteristics, RNA sequencing data and the ESTIMATE algorithm to obtain stromal and immune scores for alpha thalassemia retardation syndrome X-linked (ATRX)-mutation-type (ATRX-mt) and ATRX-wildtype (ATRX-wt) glioma tissues from The Cancer Genome Atlas. To identify specific immune biomarkers of glioma, we compared the gene expression profiles of ATRX-wt glioma tissues with high vs. low immune/stromal scores, and discovered 162 differentially expressed genes. The protein-protein interaction network based on these results contained 80 interacting genes, of which seven (HOXA5, PTPN2, WT1, HOXD10, POSTN, ADAMDEC1 and MYBPH) were identified as key prognostic genes via LASSO and Cox regression analyses. A risk model constructed using the expression of these seven genes could predict survival for ATRX-wt glioma patients, but was ineffective for ATRX-mt patients. T cells and macrophages were more prevalent in low-risk than in high-risk glioma tissues. Immune checkpoint blockade treatment was highly beneficial for patients with low risk scores. High-risk gliomas were predicted to be more sensitive to rapamycin, dasatinib, 5-fluorouracil and gemcitabine. Thus, our model can be used for the diagnosis, prognostic prediction and treatment planning of ATRX-wt glioma patients.