Browse Source

Test

etomic
jl777 8 years ago
parent
commit
71b96cf925
  1. 6
      iguana/exchanges/LP_tradebots.c

6
iguana/exchanges/LP_tradebots.c

@ -257,8 +257,10 @@ void LP_tradebot_timeslice(struct LP_tradebot *bot)
{ {
//if ( (rand() % 100) == 0 ) //if ( (rand() % 100) == 0 )
{ {
r = (double)(91 + (rand()%10))/100.; r = (double)(51 + (rand()%50))/100.;
relvol = bot->totalrelvolume * 0.1 * r; relvol = (bot->totalrelvolume - bot->relsum);
if ( relvol > (bot->totalrelvolume * .1) )
relvol *= r;
r = (double)(96 + (rand()%5))/100.; r = (double)(96 + (rand()%5))/100.;
p = LP_pricevol_invert(&v,bot->maxprice * r,relvol); p = LP_pricevol_invert(&v,bot->maxprice * r,relvol);
if ( bot->dispdir > 0 ) if ( bot->dispdir > 0 )

Loading…
Cancel
Save