From ed98a08b6f79637f7afccc31c76f2836003d6bad Mon Sep 17 00:00:00 2001 From: Ian Jackson Date: Thu, 6 Aug 2009 00:52:08 +0100 Subject: [PATCH] Permit arbitrage to work if one of the sides offers qty >1000 --- yarrg/commod-results-processor | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/yarrg/commod-results-processor b/yarrg/commod-results-processor index e53bbb5..f9fdedf 100755 --- a/yarrg/commod-results-processor +++ b/yarrg/commod-results-processor @@ -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); -- 2.30.2