Protected iceberg against negative show quantities.

This commit is contained in:
Pedro Pinto committed 2019-05-08 06:46:40 -04:00
1 parent 29ae9c6927
commit 3cc0f32617
1 file changed
+1 -1
@@ -39,7 +39,7 @@ OrderOpResult IcebergAlgo::do_before_launch(IBeforeLaunchAlgoServices &serv) {
return OrderOpResult{ORDER_ERROR_INVALID_ORDER_DEFINITON,
"Order must have either a child order definition "};
if (iceberg.show_quantity() == 0)
if (iceberg.show_quantity() <= 0)
return OrderOpResult{ORDER_ERROR_INVALID_ORDER_DEFINITON,
"Show quantity must be greater than 0"};