clear lowest pos in price

This commit is contained in:
dimxy
2019-04-19 13:51:53 +05:00
parent f7912ee8f4
commit bcd6e1a4d9

View File

@@ -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) {