From 4bafd114157e2f5fc8a1c1f87bea28078cd84681 Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 22 Nov 2017 14:32:16 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_stats.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index 1c3c6e165..d124c3894 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -460,6 +460,7 @@ void LP_ohlc_update(struct LP_ohlc *bar,uint32_t timestamp,double basevol,double bar->basesum += basevol; bar->relsum += relvol; bar->numtrades++; + printf("%d %.8f/%.8f -> %.8f\n",bar->numtrades,basevol,relvol,price); } } @@ -484,7 +485,7 @@ cJSON *LP_tradesarray(char *base,char *rel,uint32_t starttime,uint32_t endtime,i for (i=0; i= starttime && timestamp <= endtime ) + if ( (timestamp= juint(item,"timestamp")) != 0 && timestamp >= starttime && timestamp <= endtime ) { bari = (timestamp - starttime) / timescale; LP_ohlc_update(&bars[bari],timestamp,jdouble(item,"basevol"),jdouble(item,"relvol"));