In this paper, we propose the ultradiscrete optimal velocity model, a cellular-automaton model for traffic flow, by applying the ultradiscrete method for the optimal velocity model. The optimal velocity model, defined by a differential equation, is one of the most important models; in particular, it successfully reproduces the instability of high-flux traffic. It is often pointed out that there is a close relation between the optimal velocity model and the modified Korteweg-de Vries (mkdV) equation, a soliton equation. Meanwhile, the ultradiscrete method enables one to reduce soliton equations to cellular automata which inherit the solitonic nature, such as an infinite number of conservation laws, and soliton solutions. We find that the theory of soliton equations is available for generic differential equations and the simulation results reveal that the model obtained reproduces both absolutely unstable and convectively unstable flows as well as the optimal velocity model.