Browse Source

Reset iterations to price if threes dominate

jl777
jl777 7 years ago
parent
commit
da49d43d49
  1. 14
      iguana/exchanges/LP_ordermatch.c

14
iguana/exchanges/LP_ordermatch.c

@ -965,9 +965,17 @@ struct LP_quoteinfo *LP_trades_gotrequest(void *ctx,struct LP_quoteinfo *qp,stru
p = (double)qp->destsatoshis / (qp->satoshis - qp->txfee);
if ( LP_trades_pricevalidate(qp,coin,p) < 0. )
return(0);
if ( qprice >= p )
break;
price *= 0.995;
if ( i == 0 && p < myprice )
{
price = qprice;
printf("reset price <- qprice %.8f\n",qprice);
}
else
{
if ( qprice >= p )
break;
price *= 0.995;
}
i++;
}
printf("i.%d qprice %.8f myprice %.8f price %.8f [%.8f]\n",i,qprice,myprice,price,p);

Loading…
Cancel
Save