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

@@ -629,6 +629,10 @@ int64_t prices_syntheticprofits(int64_t &costbasis, int32_t firstheight, int32_t
return(0); 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 (minmax) { // if we are within day window, set costbasis to max or min price value
if (leverage > 0 && price > costbasis) { if (leverage > 0 && price > costbasis) {
costbasis = price; // set temp costbasis costbasis = price; // set temp costbasis