Tweaked test setup for taha.
This commit is contained in:
1 parent
c0ae1520f3
commit
297e24ab4e
2 files changed
+26
-5
No files matched your search
@@ -29,15 +29,18 @@ using namespace spark;
|
||||
|
||||
enum class CurrentOrderType {UNDEFINED,SPREADER,NATIVE};
|
||||
|
||||
securities::SecurityDB sec_db;
|
||||
securities::SecurityDB *sec_db = nullptr;
|
||||
|
||||
std::pair<Security const*,Security const*> get_front_month_es_futures ()
|
||||
{
|
||||
if (!sec_db)
|
||||
sec_db = new securities::SecurityDB();
|
||||
|
||||
std::pair<Security const*,Security const*> result;
|
||||
|
||||
std::map<datetime::PTime,Security const*> es_futures;
|
||||
|
||||
for (auto const &kvp : sec_db.retrieve_all()) {
|
||||
for (auto const &kvp : sec_db->retrieve_all()) {
|
||||
auto sec = *kvp.second;
|
||||
if (sec.symbol() == "ES" && sec.has_future()) {
|
||||
auto exp = datetime::make_ptime(sec.future().expiration_year(),
|
||||
|
||||
Reference in new issue
Block a user