chiark / gitweb /
Permit arbitrage to work if one of the sides offers qty >1000
authorIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 5 Aug 2009 23:52:08 +0000 (00:52 +0100)
committerIan Jackson <ian@liberator.relativity.greenend.org.uk>
Wed, 5 Aug 2009 23:52:08 +0000 (00:52 +0100)
yarrg/commod-results-processor

index e53bbb5..f9fdedf 100755 (executable)
@@ -135,10 +135,12 @@ sub main__arbitrage () {
            sub arb_subtract_qty (\@) {
                my ($verbs) = @_;
                my $verb= shift @$verbs;
+               my $vqty= $verb->{Qty};
+               $vqty =~ s/^\>//;
                unshift @$verbs, {
                     Stall => $verb->{Stall},
                     Price => $verb->{Price},
-                    Qty => $verb->{Qty} - $qty
+                    Qty => $vqty - $qty
                };
            }
            arb_subtract_qty(@buys);