From 79120f3cac81e208c97156640c05c9f0b73b7f6d Mon Sep 17 00:00:00 2001 From: jl777 Date: Tue, 2 Apr 2019 10:58:48 -1100 Subject: [PATCH] Test --- src/komodo_gateway.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/komodo_gateway.h b/src/komodo_gateway.h index 6f72f855b..7507122f3 100644 --- a/src/komodo_gateway.h +++ b/src/komodo_gateway.h @@ -2339,7 +2339,8 @@ int64_t komodo_pricecorrelated(uint64_t seed,int32_t ind,uint32_t *rawprices,int int64_t komodo_pricesmoothed(int64_t *correlated,int32_t daywindow,int64_t *nonzprices,int32_t smoothwidth) { - const int64_t coeffs[7] = { -1, 9, -45, 1, 45, -9, 1 }; // / 60 + //const int64_t coeffs[7] = { -1, 9, -45, 1, 45, -9, 1 }; // / 60 + const int64_t coeffs[7] = { -2, 0, 18, 32, 18, 0, -2 }; int32_t i,iter; int64_t smoothedden,smoothedsum,sum,den,smoothed[7],firstprice = correlated[0]; if ( daywindow < 2 ) return(0); @@ -2378,7 +2379,7 @@ int64_t komodo_pricesmoothed(int64_t *correlated,int32_t daywindow,int64_t *nonz smoothed[iter] = (sum / den); } smoothedsum = 0; - smoothedden = 1; + smoothedden = 64; for (i=0; i<7; i++) { fprintf(stderr,"%.4f ",(double)smoothed[i]/10000);