Browse Source

Test

etomic
jl777 7 years ago
parent
commit
e915d3a5f8
  1. 10
      iguana/exchanges/LP_portfolio.c

10
iguana/exchanges/LP_portfolio.c

@ -606,15 +606,21 @@ 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 && price < LP_autorefs[i].lastask )
{
printf("%s: autoprice ask update %s/%s %.8f vs myprice %.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastask,newprice);
else printf("%s: autoprice ask update %s/%s %.8f vs myprice %.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastask,newprice);
LP_autorefs[i].lastask = newprice;
}
else printf("%s: autoprice ask skip update %s/%s %.8f vs myprice %.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastask,newprice);
}
else if ( strcmp(LP_autorefs[i].rel,base) == 0 && strcmp(rel,LP_autorefs[i].base) == 0 )
{
newprice = (LP_autorefs[i].lastbid * 0.99) + (0.01 * price);
if ( LP_autorefs[i].lastbid > 0 && price > LP_autorefs[i].lastbid )
{
printf("%s: autoprice bid update %s/%s %.8f vs myprice %.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,newprice);
else printf("%s: autoprice bid update %s/%s %.8f vs myprice %.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,newprice);
LP_autorefs[i].lastbid = newprice;
}
else printf("%s: autoprice bid skip update %s/%s %.8f vs myprice %.8f -> %.8f\n",method,base,rel,price,LP_autorefs[i].lastbid,newprice);
}
}
}

Loading…
Cancel
Save