From bcd6e1a4d9671ddb7e55d3e171bd47f3b54ce187 Mon Sep 17 00:00:00 2001 From: dimxy Date: Fri, 19 Apr 2019 13:51:53 +0500 Subject: [PATCH] clear lowest pos in price --- src/cc/prices.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/cc/prices.cpp b/src/cc/prices.cpp index 12d91ad74..de20efcff 100644 --- a/src/cc/prices.cpp +++ b/src/cc/prices.cpp @@ -628,6 +628,10 @@ int64_t prices_syntheticprofits(int64_t &costbasis, int32_t firstheight, int32_t fprintf(stderr, "unexpected zero synthetic price at height.%d\n", height); return(0); } + + // clear lowest positions: + price /= 10000; + price *= 10000; if (minmax) { // if we are within day window, set costbasis to max or min price value if (leverage > 0 && price > costbasis) {