SPARK-2197 Correction to PIQ calculation per taha (+test coverage)
This commit is contained in:
1 parent
4279e3d388
commit
6066e2162c
3 files changed
+30
-3
No files matched your search
@@ -148,14 +148,14 @@ std::optional<uint32_t> search_orders(const ExchangeOrderKey oid, const std::vec
|
||||
const auto& oo = orders[x];
|
||||
if (oo.id == oid) {
|
||||
if (oo.price == price) return { position };
|
||||
else return 0 ;
|
||||
else return 0;
|
||||
}
|
||||
else if (price == oo.price) {
|
||||
position += 1;
|
||||
position += oo.size;
|
||||
}
|
||||
else {
|
||||
price = oo.price;
|
||||
position = 1;
|
||||
position = oo.size;
|
||||
}
|
||||
}
|
||||
return std::nullopt;
|
||||
|
||||
Reference in new issue
Block a user