Let the ui convert synth net change to n ticks
Whether or not to display a price in dollar or n ticks form is a display setting, and furthermore the front end assumes all prices are in dollar form
This commit is contained in:
1 parent
ce68617d86
commit
f4f67d4289
1 file changed
+2
-5
@@ -294,12 +294,9 @@ TimeStamp copy_synthetic_depth(
|
||||
if (synth.security.synthetic().price_calc() ==
|
||||
api::SyntheticContract::PRICECALC_NET_CHANGE) {
|
||||
auto settle = synth.legs[x].settlement_price();
|
||||
double tick = synth.legs[x].get_minimum_tick();
|
||||
for (size_t d = 0; d < COCONUT_MAX_DEPTH; ++d) {
|
||||
auto b = (bids[d] - settle);
|
||||
auto a = (asks[d] - settle);
|
||||
bids[d] = {b.int_price() / tick, b.size()};
|
||||
asks[d] = {a.int_price() / tick, a.size()};
|
||||
bids[d] = {bids[d].int_price() - settle, bids[d].size()};
|
||||
asks[d] = {asks[d].int_price() - settle, asks[d].size()};
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user