From 2cfd5011d1dcdf0b93a4381ef31b76639b09e7d6 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 5 Apr 2017 15:25:35 +0300 Subject: [PATCH] Test --- basilisk/tradebots_liquidity.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/basilisk/tradebots_liquidity.c b/basilisk/tradebots_liquidity.c index ef762637c..66fd27944 100755 --- a/basilisk/tradebots_liquidity.c +++ b/basilisk/tradebots_liquidity.c @@ -994,7 +994,7 @@ void _default_liquidity_command(struct supernet_info *myinfo,char *base,bits256 int32_t _default_volume_ok(struct supernet_info *myinfo,struct liquidity_info *li,int32_t dir,double volume,double price) { double minvol,maxvol; - if ( dir > 0 ) + if ( dir < 0 ) { minvol = li->minvol; maxvol = li->maxvol; @@ -1004,7 +1004,7 @@ int32_t _default_volume_ok(struct supernet_info *myinfo,struct liquidity_info *l minvol = price * li->minvol; maxvol = price * li->maxvol; } - printf("dir.%d minvol %f maxvol %f vs (%f %f) volume %f price %f\n",dir,li->minvol,li->maxvol,minvol,maxvol,volume,price); + printf("dir.%d minvol %f maxvol %f vs (%f %f) volume %f price %.8f\n",dir,li->minvol,li->maxvol,minvol,maxvol,volume,price); if ( (minvol == 0. || volume >= minvol) && (maxvol == 0. || volume <= maxvol) ) return(0); else return(-1);