From 2acc7df4dcad27068b591022b8ceaca0ec229439 Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 17 Oct 2017 20:10:00 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_portfolio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_portfolio.c b/iguana/exchanges/LP_portfolio.c index e563e9371..3f1ff3e51 100644 --- a/iguana/exchanges/LP_portfolio.c +++ b/iguana/exchanges/LP_portfolio.c @@ -275,14 +275,14 @@ void LP_autopriceset(void *ctx,int32_t dir,struct LP_priceinfo *basepp,struct LP if ( fabs(price) < SMALLVAL && refbase != 0 && refrel != 0 ) { price = LP_myprice(&bid,&ask,refbase,refrel); - printf("USE ref %s/%s %.8f factor %.8f offset %.8f\n",refbase,refrel,price,factor,offset); + printf("USE ref %s/%s %.8f factor %.8f offset %.8f margin %.8f\n",refbase,refrel,price,factor,offset,margin); } if ( LP_pricevalid(price) > 0 ) { if ( factor > SMALLVAL ) { double tmp = (price * factor) + offset; - printf("price %.8f -> %.8f factor %.8f offset %.8f [%.8f %.8f]\n",price,tmp,factor,offset,(tmp * (1. + margin)),1./(tmp * (1. + margin))); + 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. )