From: Ian Jackson Date: Wed, 5 Aug 2009 23:52:08 +0000 (+0100) Subject: Permit arbitrage to work if one of the sides offers qty >1000 X-Git-Tag: 3.0~7 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~yarrgweb/git?p=ypp-sc-tools.db-live.git;a=commitdiff_plain;h=ed98a08b6f79637f7afccc31c76f2836003d6bad Permit arbitrage to work if one of the sides offers qty >1000 --- 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);