From 429964032280a4de26d96334a8bfa55da7ed8046 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 5 Apr 2017 17:21:35 +0300 Subject: [PATCH] Test --- basilisk/basilisk_tradebot.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/basilisk/basilisk_tradebot.c b/basilisk/basilisk_tradebot.c index 44a42f281..26d06ff01 100755 --- a/basilisk/basilisk_tradebot.c +++ b/basilisk/basilisk_tradebot.c @@ -307,7 +307,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk if ( list[i].destamount > maxamount ) { maxamount = list[i].destamount; - printf("set maxamount %llu\n",(long long)maxamount); + //printf("set maxamount %llu\n",(long long)maxamount); maxi = i; } } @@ -341,7 +341,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk //retvals[0] = avebid, retvals[1] = bidvol, retvals[2] = aveask, retvals[3] = askvol; destamount = (1.0 - profitmargin) * aveprice * list[0].srcamount; if ( destamount > minamount ) - destamount = minamount; + destamount = minamount + ((minamount - destamount) * (1 + (rand() % 100))) / 100.; printf("%s/%s pm %f aveprice %f src %.8f dest %.8f avebid %f bidvol %f, aveask %f askvol %f\n",list[0].src,list[0].dest,profitmargin,aveprice,dstr(list[0].srcamount),dstr(destamount),retvals[0],retvals[1],retvals[2],retvals[3]); if ( (retstr= InstantDEX_available(myinfo,iguana_coinfind(list[0].dest),0,0,list[0].dest)) != 0 ) { @@ -371,7 +371,7 @@ double basilisk_request_listprocess(struct supernet_info *myinfo,struct basilisk *issueR = list[maxi]; for (i=0; i %.8f\n",maxi,list[maxi].requestid,list[maxi].quoteid,dstr(maxamount),dstr(minamount)); + printf(" automatch[%d] r.%u quoteid.%u triggered %.8f >= %.8f\n",maxi,list[maxi].requestid,list[maxi].quoteid,dstr(maxamount),dstr(minamount)); if ( minamount > 0 ) metric = (dstr(maxamount) / dstr(minamount)) - 1.; else metric = 1.;