The answer for the sign of charge is given by the answer of Andrei. I will reply to
My question is, is the charge of the up quark and down quark also arbitrary ?
No the charges of the hadrons were and are measured in the lab. Pions, Kaons ,and all the plethora of resonances in the particle data tables have a definite charge a multiple of the charge of the electron, its negatives or zero.
Back in the sixties it was observed that other quantum numbers assigned to all these particles and resonances allowed them to be grouped in an SU(3) representations, now called the eightfold way.
An example of such a representation:

The hadronic decouplet , which predicted the Ω- from the symmetry of the representation, it had to exist and it was found.
Now SU(3) is the special unitary group of 3 states, this led to the proposal of the existence of a subset of 3 quarks with various quantum number combinations to add up to the charges of the observed particles . The proposed quarks, up and down, got the assigned charges so that they could add up to 1 for the proton and 0 for the neutron, and so on for consistency with other quantum numbers.
So the up and down charges are not arbitrary, once the electron charge is defined, they are constrained by the symmetries of the flavor SU(3) group, all observed hadronic particles and resonances fill a niche in one of its representations.