Spark-577 display factory wackyness.

This commit is contained in:
Eric Harding committed 2018-03-05 17:31:15 -05:00
1 parent c59cb19fea
commit bb1449c55e
1 file changed
+3 -2
@@ -218,7 +218,8 @@ void MDP3Listener::onDefinition(onixs::Handler&, const onixs::Security& osec, co
fsec.low_tick = fsec.high_tick = min_tick;
onixs::PRICE min_tick_amount;
sec.minPriceIncrementAmount(min_tick_amount);
fsec.cash_per_point = double_of_price(min_tick_amount, 0) / min_tick;
double min_tick_dbl = double_of_price(min_tick_amount, 0);
fsec.cash_per_point = min_tick_dbl / min_tick / pow10(fsec.display_factor);
auto expiration = date_of_maturity(sec);
fsec.expiration_year = expiration.year;
fsec.expiration_month = expiration.month;
@@ -259,7 +260,7 @@ void MDP3Listener::onDefinition(onixs::Handler&, const onixs::Security&, const o
if (sec.tickRule(tick_rule)) {
decode_ticks(tick_rule, double_of_price(min_tick, 0), fsec);
}
fsec.cash_per_point = double_of_price(min_tick_amount, 0) / fsec.low_tick;
fsec.cash_per_point = double_of_price(min_tick_amount, 0) / fsec.low_tick / pow10(fsec.display_factor);
fsec.call_put = sec.putOrCall() == onixs::PutOrCall::Call ? api::PUTORCALL_CALL : api::PUTORCALL_PUT;