code to move around orders
This commit is contained in:
1 parent
b9c25dab4b
commit
f9886cfd44
1 file changed
+8
-2
@@ -107,7 +107,13 @@ public:
|
||||
}
|
||||
}
|
||||
else if (tick_diff<0){
|
||||
|
||||
for (SubOrder* optr : _aux_orders){
|
||||
SubOrder& o=*optr;
|
||||
if(o.order.out_price().value()>_target_price.value()){
|
||||
Price price=_find_slot(_target_price,true);
|
||||
o.order.modify_order(Price(price),Quantity(target_qty));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
void cancel(){
|
||||
@@ -190,7 +196,7 @@ public:
|
||||
// (going numerically up or down based on
|
||||
// the second arg) where there is no
|
||||
// working order
|
||||
Price _find_empty_level(Price start, bool down){
|
||||
Price _find_slot(Price start, bool down){
|
||||
double inc=down?-1.0*_tick_size:_tick_size;
|
||||
double rv=start.value();
|
||||
while(true){
|
||||
|
||||
Reference in new issue
Block a user