From f52d56477cf4c0b4fe9a866d996d0a64af9cdd83 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 19 Jan 2018 11:41:54 +0200 Subject: [PATCH] Test --- iguana/exchanges/LP_portfolio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_portfolio.c b/iguana/exchanges/LP_portfolio.c index 7e70dfa8f..6158d36bc 100644 --- a/iguana/exchanges/LP_portfolio.c +++ b/iguana/exchanges/LP_portfolio.c @@ -539,7 +539,7 @@ void LP_autoprice_iter(void *ctx,struct LP_priceinfo *btcpp) if ( LP_autorefs[i].fundbid[0] != 0 && (bidprice= jdouble(fundjson,LP_autorefs[i].fundbid)) > SMALLVAL && LP_autorefs[i].fundask[0] != 0 && (askprice= jdouble(fundjson,LP_autorefs[i].fundask)) > SMALLVAL ) { price = (bidprice + askprice) * 0.5; - bidprice = price * (1. - buymargin); + bidprice = (1. / price * (1. - buymargin)); askprice = price * (1. + sellmargin); LP_mypriceset(&changed,rel,base,bidprice); LP_pricepings(ctx,LP_myipaddr,LP_mypubsock,rel,base,bidprice);