-
Notifications
You must be signed in to change notification settings - Fork 118
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Question on addOrdersAtPrice #8
Comments
Hi @WillySeahh Here's my implementation. I wrote a decent amount of code comments; maybe it will help understand the logic in the section. https://github.com/stacygaudreau/nitek/blob/main/source/nitek/exchange/orders/ome_order_book.cpp FYI - my method is named Hope it helps |
Thanks @stacygaudreau Thanks for sharing, i have saw your code in On your code https://github.com/stacygaudreau/nitek/blob/main/source/nitek/exchange/orders/ome_order_book.cpp, line 199-220. I was wondering if there is a better way to decide to add_after or add_before. Maybe we can refactor it to only handle add_after? Afterall add_before is basically just add_after of the previous |
No problem. Yeah, I reckon there are some different approaches to the logic there if you want to change it! There's a pretty decent set of test cases written for the Order Book logic in |
https://github.com/PacktPublishing/Building-Low-Latency-Applications-with-CPP/blob/main/Chapter7/exchange/matcher/me_order_book.h
For the else case where we are iterating through the double linked list, why do we need a if (addAfter) and then a while loop? We can combine that right? (abit stuck with it)...
The text was updated successfully, but these errors were encountered: