Browse Source

clear lowest pos in price

z_createrawtransaction
dimxy 5 years ago
parent
commit
bcd6e1a4d9
  1. 4
      src/cc/prices.cpp

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

Loading…
Cancel
Save