I analyze charge order in hole-doped cuprates. I argue that magnetically-mediated interaction, which is known to give rise to d-wave superconductivity, also gives rise to charge-density-wave instabilities with momenta Qx =(Q,0) and Qy =(0,Q), as seen in the experiments. I show that the emerging charge order with Qx/Qy is of stripe type and that a stripe charge order parameter by itself has two components: one is incommensurate density variation, another is incommensurate current. Both components are non-zero in the CDW-ordered state, with the relative phase ± π/2. Such an order breaks time reversal symmetry. I further show that, before a true incommensurate CDW order sets in, the system develops a pre-emptive composite order which breaks lattice rotational symmetry and time-reversal symmetry but preserves a translational U(1) symmetry. I discuss the interplay between our CDW order and superconductivity and the phase diagram of underdoped cuprates.