chiark
/
gitweb
/
~yarrgweb
/
ypp-sc-tools.main.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Permit arbitrage to work if one of the sides offers qty >1000
[ypp-sc-tools.main.git]
/
yarrg
/
commod-results-processor
diff --git
a/yarrg/commod-results-processor
b/yarrg/commod-results-processor
index e53bbb58c1351283043d6371abfc4bc0589fe9d5..f9fdedfa5f6c0c5419ccf826b10db106aa9cfaea 100755
(executable)
--- 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;
sub arb_subtract_qty (\@) {
my ($verbs) = @_;
my $verb= shift @$verbs;
+ my $vqty= $verb->{Qty};
+ $vqty =~ s/^\>//;
unshift @$verbs, {
Stall => $verb->{Stall},
Price => $verb->{Price},
unshift @$verbs, {
Stall => $verb->{Stall},
Price => $verb->{Price},
- Qty => $v
erb->{Qty}
- $qty
+ Qty => $v
qty
- $qty
};
}
arb_subtract_qty(@buys);
};
}
arb_subtract_qty(@buys);