Browse Source

Test

etomic
jl777 7 years ago
parent
commit
b1b5b13a33
  1. 3
      iguana/exchanges/LP_portfolio.c

3
iguana/exchanges/LP_portfolio.c

@ -613,6 +613,7 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp)
void LP_autoprices_update(char *method,char *base,double basevol,char *rel,double relvol)
{
int32_t i; double price,newprice;
return;
if ( basevol > 0. && relvol > 0. )
{
price = relvol/basevol;
@ -623,7 +624,7 @@ void LP_autoprices_update(char *method,char *base,double basevol,char *rel,doubl
newprice = (LP_autorefs[i].lastask * 0.99) + (0.01 * price);
if ( LP_autorefs[i].lastask > 0 )
{
printf("%s: autoprice ask update %s/%s %.8f vs myprice %.8f/%.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,LP_autorefs[i].lastask,newprice);
//printf("%s: autoprice ask update %s/%s %.8f vs myprice %.8f/%.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,LP_autorefs[i].lastask,newprice);
LP_autorefs[i].lastask = newprice;
} // else printf("%s: autoprice ask skip update %s/%s %.8f vs myprice %.8f/%.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,LP_autorefs[i].lastask,newprice);
}

Loading…
Cancel
Save