Fix double multiply of tick rule for futures

This commit is contained in:
Eric Harding committed 2017-10-10 14:47:24 -04:00
1 parent 4a7312b18e
commit fe77ac51af
5 files changed
+8 -14

No files matched your search

+1 -1
View File
@@ -82,7 +82,7 @@
"type": "cppdbg",
"request": "launch",
"program": "/home/eharding/spark/sparkd",
"args": [],
"args": ["run"],
"stopAtEntry": false,
"cwd": "/home/eharding/spark/",
"environment": [],
@@ -61,7 +61,6 @@ namespace mbts.co2
if (updated > time && updated != UInt64.MaxValue) {
if (bids == null || bids.Length < 10) bids = new NativePriceSize[10];
if (asks == null || asks.Length < 10) asks = new NativePriceSize[10];
var ask_vec = new NativePriceSize[10];
for (int depth = 0; depth < 10; ++depth) {
bids[depth] = _hot_depth->bid(depth);
asks[depth] = _hot_depth->ask(depth);
@@ -208,7 +208,7 @@ void MDP3Listener::onDefinition(onixs::Handler&, const onixs::Security& osec, co
FixedFutureSecurity fsec;
set_security_common(sec, fsec);
fsec.price_break = 0;
fsec.low_tick = fsec.high_tick = double_of_price(sec.minPriceIncrement()) * pow10(fsec.display_factor);
fsec.low_tick = fsec.high_tick = double_of_price(sec.minPriceIncrement());
auto expiration = date_of_maturity(sec);
fsec.expiration_year = expiration.year;
fsec.expiration_month = expiration.month;
@@ -268,6 +268,11 @@ void MDP3Listener::onDefinition(onixs::Handler&, const onixs::Security&, const o
set_security_common(sec, fsec);
vector<uint32_t> leg_exchange_ids;
leg_exchange_ids.reserve(sec.legs().size());
int8_t tick_rule;
if (sec.tickRule(tick_rule)) {
decode_ticks(tick_rule, 0.0, fsec);
}
fsec.set_leg_count(sec.legs().size());
for(size_t x = 0; x < fsec.leg_count(); ++x) {
@@ -22,15 +22,6 @@ using namespace bts::co2;
namespace bts {
namespace md {
// void run_onixs_mdp3_server(UserSymbol* psyms, size_t symcount) {
// MDP3Main main;
// vector<UserSymbol> symbols;
// for (size_t x = 0; x < symcount; ++x) {
// symbols.push_back(psyms[x]);
// }
// main.run(symbols);
// }
MDP3Main::MDP3Main() :
_producer(PLATFORM_MDP3ONIXS),
_security_recorder(),
@@ -321,7 +312,6 @@ unique_ptr<MDP3Listener> MDP3Main::prepare_listener(onixs::Handler& handler, con
vector<MDProducerChannel> producer_channels;
for (auto& symbol : channel.symbols) {
producer_channels.push_back(_producer.get_channel(symbol.symbol().c_str(), symbol.type(), symbol.exchange()));
//handler.addSecurityAssetFilter(symbol.symbol());
}
unique_ptr<MDP3Listener> listener(new MDP3Listener(_index, _producer, _security_recorder, _settlement_recorder, producer_channels, utils::Dispatcher::current()));
+1 -1
View File
@@ -5,10 +5,10 @@ if "%target%"=="" set target=gcc_debug
call %~dp0\ensure_lhome.cmd
cd %~dp0\..
docker run --rm -i ^
-p 8000:8000 -p 8001:8001 -p 2000:22 %* ^
--security-opt seccomp=unconfined ^
-v %linuxhome%:/root/ ^
-v %cd%:/bts ^
-h %COMPUTERNAME%_spark ^
--net host ^
-t bluetradingsystems/linux_docker ^
/bin/bash -c "/usr/sbin/sshd -D & (cd ~/www && python -m SimpleHTTPServer >/dev/null 2>/dev/null) & cd /bts/build/%target%/; /bin/bash"