chronoxor / CppTrader

High performance components for building Trading Platform such as ultra fast matching engine, order book processor
MIT License
833 stars 254 forks source link

Decimal value #27

Closed gennadylokal closed 2 years ago

gennadylokal commented 2 years ago

Hello @chronoxor

I want to know why the price and quantity don't have a decimal value, is there any particular concern? is there any problem if I change it to decimal value?

Thank you in advance.

chronoxor commented 2 years ago

1) Performance 2) Precision loss for float data types in money calculations 3) There is no Decimal data type out of box in C++ compilers without using heavy third-party libs

welly87 commented 2 years ago

so basically we need to convert decimal (dollar) into decicents or something? @chronoxor