If three charged particles are collinear and in equilibrium, the net force on each particle must be zero. This is only possible if the forces from the other two charges cancel out. For this to happen, at least one of the charges must have an opposite sign, so that attractive and repulsive forces can balance. Hence, all particles cannot have the same sign.