From e8611fd173bd32c40cf0633dffbc9571942661b5 Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 5 Jun 2017 11:02:18 +0300 Subject: [PATCH] Test --- iguana/exchanges/LP_prices.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_prices.c b/iguana/exchanges/LP_prices.c index 999ed3c2b..f575ac0ec 100644 --- a/iguana/exchanges/LP_prices.c +++ b/iguana/exchanges/LP_prices.c @@ -123,8 +123,10 @@ void LP_priceinfoupdate(char *base,char *rel,double price) struct LP_priceinfo *basepp,*relpp; if ( (basepp= LP_priceinfofind(base)) != 0 && (relpp= LP_priceinfofind(rel)) != 0 ) { - dxblend(&basepp->relvals[relpp->ind],price,0.9); - dxblend(&relpp->relvals[basepp->ind],1. / price,0.9); + //dxblend(&basepp->relvals[relpp->ind],price,0.9); + //dxblend(&relpp->relvals[basepp->ind],1. / price,0.9); + basepp->relvals[relpp->ind] = price; + relpp->relvals[basepp->ind] = 1. / price; } } @@ -139,6 +141,7 @@ double LP_myprice(double *bidp,double *askp,char *base,char *rel) if ( (val= relpp->myprices[basepp->ind]) != 0. ) { *bidp = 1. / val; + printf("myprice (%.8f %.8f)\n",*bidp,*askp); return((*askp + *bidp) * 0.5); } }