Browse Source

Test

etomic
jl777 7 years ago
parent
commit
4bfb900d4a
  1. 6
      iguana/exchanges/LP_portfolio.c

6
iguana/exchanges/LP_portfolio.c

@ -282,10 +282,10 @@ void LP_autopriceset(int32_t ind,void *ctx,int32_t dir,struct LP_priceinfo *base
}
if ( LP_pricevalid(price) > 0 )
{
if ( 0 && factor > SMALLVAL )
if ( factor > SMALLVAL )
{
double tmp = (price * factor) + offset;
printf("price %.8f -> %.8f factor %.8f offset %.8f margin %.8f [%.8f %.8f] [%.8f %.8f]\n",price,tmp,factor,offset,margin,(tmp * (1. + margin)),1./(tmp * (1. - margin)),(tmp * (1. - margin)),1./(tmp * (1. + margin)));
//double tmp = (price * factor) + offset;
//printf("price %.8f -> %.8f factor %.8f offset %.8f margin %.8f [%.8f %.8f] [%.8f %.8f]\n",price,tmp,factor,offset,margin,(tmp * (1. + margin)),1./(tmp * (1. - margin)),(tmp * (1. - margin)),1./(tmp * (1. + margin)));
price = (price * factor) + offset;
}
if ( margin == 0. )

Loading…
Cancel
Save