Compare commits

..
4 Commits
Author SHA1 Message Date
Eric Harding dd82d127ea Merged in shell_crash_empty_size (pull request #241)
RTM: Fix for shell able to send 0 size orders

Approved-by: Pedro Pinto <pedro.pinto+atlassian@bluetradesys.com>
2019-05-29 21:37:27 +00:00
Pedro Pinto f97e22d6eb Updated release notes. 2019-05-29 17:31:34 -04:00
Eric Harding f9e04ee28c Fix for shell able to send 0 size orders 2019-05-29 17:31:24 -04:00
Pedro Pinto 1ce00ca13d Fixed simulator's handling of 0 sized quantities. 2019-05-29 17:27:08 -04:00
3 changed files with 19 additions and 7 deletions

No files matched your search

+8
View File
@@ -4,6 +4,14 @@ weight = 3
sort_by = "weight"
insert_anchor_links = "right"
+++
## 2.1.3
### User Visible Changes
- Fixed a simulator bug in the handling of 0 sized orders
## 2.2.1
### User Visible Changes
- Fixed order book form exception when display a spreader order for whichs the legs were not present yet
## 2.1.1
### User Visible Changes
- Added PIQ to GLBX Iceberg orders
@@ -390,12 +390,16 @@ namespace mbts.spark {
if (order_properties_vm == null)
return;
var s = _settings_manager.current_settings();
if (DoubleHelper.IsNaNOrInfinity(args.price) || !args.side.HasValue || HasErrors || order_properties_vm.HasErrors || (size_from_alternate && s.alternate_order_size == 0))
if (DoubleHelper.IsNaNOrInfinity(args.price) || !args.side.HasValue || HasErrors || order_properties_vm.HasErrors || (size_from_alternate && s.alternate_order_size == 0)) {
return;
if (!size_from_alternate && (!size_calculator.value.HasValue || size_calculator.value.Value == 0))
}
if (!size_from_alternate && (!size_calculator.value.HasValue || size_calculator.value.Value == 0)) {
size_calculator.flash_error();
uint size = size_from_alternate ? s.alternate_order_size : (uint)Math.Abs(size_calculator.value.Value);
send_order_async(args.side.Value, size, args.price).ignore();
}
else {
uint size = size_from_alternate ? s.alternate_order_size : (uint)Math.Abs(size_calculator.value ?? 0);
send_order_async(args.side.Value, size, args.price).ignore();
}
}
public async Task send_order_async(Side side, uint size, double price) {
@@ -222,7 +222,7 @@ void ExchangeSimApplication::onMessage(const FIX42::NewOrderSingle &message,
order.set_type(convert(ordType));
if (orderQty.getValue() == 0)
throw new std::logic_error("Quantity must be greater than 0");
throw std::logic_error("Quantity must be greater than 0");
if (order.type() == api::orderman::NATIVE_ORDER_TYPE_LIMIT)
order.set_price(price);
@@ -232,13 +232,13 @@ void ExchangeSimApplication::onMessage(const FIX42::NewOrderSingle &message,
if (book.asks.size())
order.set_price(book.asks.begin()->first.value());
else
throw new std::logic_error("No sell market");
throw std::logic_error("No sell market");
} else {
if (book.bids.size())
order.set_price(book.bids.begin()->first.value());
else
throw new std::logic_error("No buy market");
throw std::logic_error("No buy market");
}
}
order.set_quantity(orderQty);