17 assert((
Id > 0) &&
"Order Id must be greater than zero!");
22 assert((
Quantity >=
LeavesQuantity) &&
"Order quantity must be greater than or equal to order leaves quantity!");
25 assert((
LeavesQuantity > 0) &&
"Order leaves quantity must be greater than zero!");
32 assert((
IsIOC() ||
IsFOK()) &&
"Market order must have 'Immediate-Or-Cancel' or 'Fill-Or-Kill' parameter!");
35 assert(!
IsIceberg() &&
"Market order cannot be 'Iceberg'!");
43 assert(!
IsSlippage() &&
"Limit order cannot have slippage parameter!");
51 assert(!
IsAON() &&
"Stop order cannot have 'All-Or-None' parameter!");
54 assert(!
IsIceberg() &&
"Stop order cannot be 'Iceberg'!");
62 assert(!
IsSlippage() &&
"Stop-limit order cannot have slippage!");
70 assert((
TrailingDistance != 0) &&
"Trailing stop order must have non zero distance to the market!");
82 assert(((
TrailingDistance <= -1) && (
TrailingDistance >= -1000)) &&
"Trailing percentage distance must be in the range [0.01, 100%] (from -1 down to -10000)!");
@ ORDER_PARAMETER_INVALID
C++ Trader project definitions.
bool IsFOK() const noexcept
Is the 'Fill-Or-Kill' order?
ErrorCode Validate() const noexcept
Validate order parameters.
bool IsIceberg() const noexcept
Is the 'Iceberg' order?
bool IsStopLimit() const noexcept
Is the stop-limit order?
bool IsAON() const noexcept
Is the 'All-Or-None' order?
bool IsTrailingStop() const noexcept
Is the trailing stop order?
int64_t TrailingStep
Order trailing step.
bool IsSlippage() const noexcept
Is the order have slippage?
uint64_t LeavesQuantity
Order leaves quantity.
bool IsLimit() const noexcept
Is the limit order?
bool IsMarket() const noexcept
Is the market order?
int64_t TrailingDistance
Order trailing distance to market.
bool IsIOC() const noexcept
Is the 'Immediate-Or-Cancel' order?
bool IsStop() const noexcept
Is the stop order?
bool IsTrailingStopLimit() const noexcept
Is the trailing stop-limit order?
uint64_t Quantity
Order quantity.