Plasma diagnostics in magnetic confinement fusion plasmas by using visible spectrum strongly depends on the knowledge of fundamental atomic properties. A detailed collisional-radiative model of W$^{26+}$ ions has been constructed by considering radiative and electron excitation processes, in which the necessary atomic data had been calculated by relativistic configuration interaction method with the implementation of Flexible Atomic Code. The visible spectrum observed at an electron beam ion trap (EBIT) in Shanghai in the range of 332 nm to 392 nm was reproduced by present calculations. Some transition pairs of which the intensity ratio are sensitive to the electron density were selected as potential candidate of plasma diagnostics. Their electron density dependence are theoretically evaluated for the cases of EBIT plasmas and magnetic confinement fusion plasmas.