|
|
@ -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. ) |
|
|
|