From bb1449c55efd97dde9273402f7cb6ed68dc44585 Mon Sep 17 00:00:00 2001 From: Eric Harding Date: Mon, 5 Mar 2018 17:31:15 -0500 Subject: [PATCH] Spark-577 display factory wackyness. --- src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp index 3248aec75..9dca498e3 100644 --- a/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp +++ b/src/server/sparkd/md/platforms/mdp3_onixs/MDP3Listener.cpp @@ -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;