Ab initio calculations have been performed to unravel the origin of the recently found superlattice peaks in the trilayer nickelate La$_4$Ni$_3$O$_8$. These peaks arise from static charge ordering of Ni$^{2+}$/ Ni$^{1+}$ stripes oriented at 45$^{circ}$ to the Ni-O bonds. An insulating state originates from a combination of structural distortions and magnetic order, with the gap being formed solely within the d$_{x^2-y^2}$ manifold of states. When doped, electrons or holes would go into these states, in a similar fashion to what occurs in the cuprates. Analogous calculations suggest that checkerboard charge order should occur in the bilayer nickelate La$_3$Ni$_2$O$_6$. These results reveal a close connection between La$_4$Ni$_3$O$_8$ and La$_3$Ni$_2$O$_6$ with La$_{2-x}$Sr$_x$NiO$_4$ for x=1/3 and x=1/2, respectively.