variable name change

This commit is contained in:
Taha Afzal committed 2017-10-09 19:06:52 -04:00
1 parent af349f10c4
commit 7f87866e2c
4 files changed
+17 -17

No files matched your search

@@ -82,7 +82,7 @@ SpreaderOrder::SpreaderOrder(securities::SecurityDB& db,
{
OrderTemplate order_template;
SpreaderBookkeepingData::LegData& leg_data = _bookkeeping_data->get_leg_data(index);
bts::orderman::SpreaderOrderBase::ChildFactory child_factory = get_child_factory(leg_data.leg_shared_data.security(), leg_data.leg_shared_data.trading_side, api::orderman::ChildOrderKind::COK_SPREADER_QUOTING);
bts::orderman::SpreaderOrderBase::ChildFactory child_factory = get_child_factory(leg_data.leg_property_data.security(), leg_data.leg_property_data.trading_side, api::orderman::ChildOrderKind::COK_SPREADER_QUOTING);
bts::orderman::SpreaderOrderBase::ChildOrder child_order = child_factory();
leg_data.order_key = child_order.order_key();
leg_data.quoter = new SingleLegQuoter(me_ref, order_template, index, Price(cor.spreader().price()), Quantity(cor.spreader().quantity()), child_order);
@@ -225,7 +225,7 @@ void SpreaderOrder::on_book(TickToTradeCorID cid, Book const& book)
for (size_t idx = 0; idx < _bookkeeping_data->count(); idx++)
{
SpreaderBookkeepingData::LegData& d = _bookkeeping_data->get_leg_data(idx);
d.quoter->update_md(md_leg.leg_shared_data.leg_index);
d.quoter->update_md(md_leg.leg_property_data.leg_index);
}
// send MD to hedgers hedging this security only
for (size_t h_idx = 0; h_idx < md_leg.n_hedgers(); h_idx++)
@@ -361,7 +361,7 @@ const orderman::Book& SpreaderOrder::get_book(size_t leg_index) const
}
const LegPropertyData& SpreaderOrder::get_leg_data(size_t leg_index) const
{
return _bookkeeping_data->get_leg_data(leg_index).leg_shared_data;
return _bookkeeping_data->get_leg_data(leg_index).leg_property_data;
}
size_t SpreaderOrder::n_legs() const
{
@@ -414,10 +414,10 @@ void SpreaderOrder::_handle_quoter_order_update(SpreaderBookkeepingData::LegData
// leg_data.avergage_filled_price = update_message.avg_price;
// for (size_t idx = 0; idx < _bookkeeping_data->count(); idx++)
// {
// if (idx != leg_data.leg_shared_data.leg_index)
// if (idx != leg_data.leg_property_data.leg_index)
// {
// leg_data.quoter->update_other_leg_fills(leg_data.leg_shared_data.leg_index, this_fill_quantity);
// _send_hedge(leg_data.leg_shared_data.leg_index, this_fill_price, this_fill_quantity, idx);
// leg_data.quoter->update_other_leg_fills(leg_data.leg_property_data.leg_index, this_fill_quantity);
// _send_hedge(leg_data.leg_property_data.leg_index, this_fill_price, this_fill_quantity, idx);
// }
// }
//}
@@ -139,7 +139,7 @@ namespace spreader
for (size_t idx = 0; idx < _bookkeeping_data->count(); idx++)
{
SpreaderBookkeepingData::LegData& d = _bookkeeping_data->get_leg_data(idx);
d.quoter->update_md(md_leg.leg_shared_data.leg_index);
d.quoter->update_md(md_leg.leg_property_data.leg_index);
}
// send MD to hedgers hedging this security only
for (size_t h_idx = 0; h_idx < md_leg.n_hedgers(); h_idx++)
@@ -292,7 +292,7 @@ namespace spreader
}
const LegPropertyData& SimpleSpreader::get_leg_data(size_t leg_index) const
{
return _bookkeeping_data->get_leg_data(leg_index).leg_shared_data;
return _bookkeeping_data->get_leg_data(leg_index).leg_property_data;
}
size_t SimpleSpreader::n_legs() const
{
@@ -345,10 +345,10 @@ namespace spreader
leg_data.avergage_filled_price = update_message.avg_price;
for (size_t idx = 0; idx < _bookkeeping_data->count(); idx++)
{
if (idx != leg_data.leg_shared_data.leg_index)
if (idx != leg_data.leg_property_data.leg_index)
{
leg_data.quoter->update_other_leg_fills(leg_data.leg_shared_data.leg_index, this_fill_quantity);
_send_hedge(leg_data.leg_shared_data.leg_index, this_fill_price, this_fill_quantity, idx);
leg_data.quoter->update_other_leg_fills(leg_data.leg_property_data.leg_index, this_fill_quantity);
_send_hedge(leg_data.leg_property_data.leg_index, this_fill_price, this_fill_quantity, idx);
}
}
}
@@ -400,7 +400,7 @@ namespace spreader
leg_index, hedge_price, hedge_quantity);
SpreaderBookkeepingData::LegData& leg_data = _bookkeeping_data->get_leg_data(leg_index);
OrderTemplate hedge_order_template;
SpreaderBookkeepingData::HedgerData& hedger_data = leg_data.add_new_hedger(*this, leg_index, hedge_order_template, leg_data.leg_shared_data, hedge_price, hedge_quantity, api::SIDE_BUY);
SpreaderBookkeepingData::HedgerData& hedger_data = leg_data.add_new_hedger(*this, leg_index, hedge_order_template, leg_data.leg_property_data, hedge_price, hedge_quantity, api::SIDE_BUY);
hedger_data.hedger.init();
}
@@ -416,7 +416,7 @@ namespace spreader
return make_order_template(_bookkeeping_data->security,
orderman::AccountName(), //TODO _create_order_request.native_order().account_name
orderman::OperatorID(), //_create_order_request.native_order().operator_id(),
leg_data.leg_shared_data.trading_side,
leg_data.leg_property_data.trading_side,
UserLogin());
}
}}
@@ -41,7 +41,7 @@ public:
class LegData
{
public:
const LegPropertyData leg_shared_data;
const LegPropertyData leg_property_data;
orderman::Book book;
SingleLegQuoter* quoter;
Quantity filled_quantity;
@@ -51,7 +51,7 @@ public:
LegData(const LegPropertyData& leg_shared_data_arg)
:
leg_shared_data(leg_shared_data_arg),
leg_property_data(leg_shared_data_arg),
filled_quantity (Quantity (0))
{
}
@@ -100,7 +100,7 @@ public:
security(security_arg)
{
for (auto it = leg_data.begin(); it != leg_data.end(); ++it)
_sec_key_to_index.insert(std::pair<uint32_t, size_t>(it->leg_shared_data.security_key(), it->leg_shared_data.leg_index));
_sec_key_to_index.insert(std::pair<uint32_t, size_t>(it->leg_property_data.security_key(), it->leg_property_data.leg_index));
}
bool get_index(SecurityKey sec_key, size_t& index)
{
+1 -1
View File
@@ -150,7 +150,7 @@ namespace bts {
const LegPropertyData& get_leg_data(size_t index) const override
{
SpreaderBookkeepingData::LegData& leg_data = bookkeeping_data->get_leg_data(index);
return leg_data.leg_shared_data;
return leg_data.leg_property_data;
}
// number of legs on the spread
size_t n_legs() const override