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

Minor correction. #6

Closed ghost closed 5 years ago

ghost commented 5 years ago

I think the second "_market_handler.onExecuteOrder(order_ptr, price, quantity);" (line 1238) is redundant. The market handler will process the execution price and quantity in the first call to "_market_handler.onExecuteOrder(executing_order_ptr, price, quantity);" (line 1226).

chronoxor commented 5 years ago

onExecuteOrder(*executing_order_ptr, ...) - this call is for executing all next available orders in the book that opposite to the current order (e.g. SELL orders)

onExecuteOrder(*order_ptr, ...) - this call is for executing the current order for the required volume (e.g. BUY order) that opposite to the executing order

ghost commented 5 years ago

Ok I see now. Thank you :)