From 1d445d55c3ce68540b6983e21c4a336ea628f1d4 Mon Sep 17 00:00:00 2001 From: jl777 Date: Fri, 24 Nov 2017 19:53:39 +0400 Subject: [PATCH] Test --- iguana/exchanges/LP_stats.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/iguana/exchanges/LP_stats.c b/iguana/exchanges/LP_stats.c index d6ce19cdb..02ef164f0 100644 --- a/iguana/exchanges/LP_stats.c +++ b/iguana/exchanges/LP_stats.c @@ -519,7 +519,7 @@ struct LP_ohlc cJSON *LP_ohlc_json(struct LP_ohlc *bar) { cJSON *item; - if ( bar->numtrades != 0 && bar->relsum > SMALLVAL && bar->basesum > SMALLVAL ) + //if ( bar->numtrades != 0 && bar->relsum > SMALLVAL && bar->basesum > SMALLVAL ) { item = cJSON_CreateArray(); jaddinum(item,bar->timestamp); @@ -529,7 +529,9 @@ cJSON *LP_ohlc_json(struct LP_ohlc *bar) jaddinum(item,bar->close); jaddinum(item,bar->relsum); jaddinum(item,bar->basesum); - jaddinum(item,bar->relsum / bar->basesum); + if ( bar->basesum != 0 ) + jaddinum(item,bar->relsum / bar->basesum); + else jaddinum(item,0); jaddinum(item,bar->numtrades); return(item); }