Browse Source

Test

etomic
jl777 8 years ago
parent
commit
546f5f9ba8
  1. 2
      iguana/exchanges/mm.c

2
iguana/exchanges/mm.c

@ -663,7 +663,7 @@ void marketmaker(double minask,double maxbid,char *baseaddr,char *reladdr,double
printf("AVE.(%.8f %.8f) hbla %.8f %.8f bid %.8f ask %.8f theory %.8f buys.(%.6f %.6f) sells.(%.6f %.6f) incr.(%.6f %.6f) balances.(%.8f + %.8f, %.8f + %.8f) test %f\n",avebid,aveask,highbid,lowask,mmbid,mmask,theoretical,buyvol,pendingbids,sellvol,pendingasks,bidincr,askincr,balance_base,DEX_base,balance_rel,DEX_rel,(aveask - avebid)/aveprice);
if ( (retstr= DEX_swapstatus()) != 0 )
printf("%s\n",retstr), free(retstr);
printf("%s %.8f, %s %.8f\n",base,DEX_balance("DEX",base,DEX_baseaddr),rel,DEX_balance("DEX",rel,DEX_reladdr));
printf("%s %s, %s %s\n",base,DEX_balance("DEX",base,DEX_baseaddr),rel,DEX_balance("DEX",rel,DEX_reladdr));
if ( (aveask - avebid)/aveprice > profitmargin )
bid = highbid * (1 - profitmargin), ask = lowask * (1 + profitmargin);
else bid = avebid - profitmargin*aveprice, ask = avebid + profitmargin*aveprice;

Loading…
Cancel
Save