Base datatypes int and float could be refactored to have unsigned / signed int / float

Imported from previous forum

Presently there are two levels of Datatypes defined in FIX - base type for example int and derived types from int like Length, TagNum, SeqNum, DayOfMonth etc. These derived types explicitly state “Value must be positive” for Length and SeqNum, “Value must be positive and may not contain leading zeros” for TagNum, “values 1 to 31” for DayOfMonth.

For float the description says “fields which are derived from float may contain negative values unless explicitly specified otherwise.” But types derived from float do not explicitly state about positive / negetive values. For example Qty derives from float and the description is “float field capable of storing either a whole number (no decimal places) of “shares” (securities denominated in whole units) or a decimal value containing decimal places for non-share quantity asset classes (securities denominated in fractional units).”

So can a negetive quantity be specified in an order? What would it mean if I send a Buy order for a negetive quantity ie ^35=D^54=1^38=-1000^ ? Could this be interpreted as Sell Order of the positive quantity ie ^35=D^54=2^38=1000^ ? Could this interpretation be specified in the “Rules of Engagement” :wink:

To remove these ambiguities I would reccomend that base datatype float be extended to unsigned float and signed float, then quantity, price etc extend from these extended datatypes. Similarly for int.