SniperPolygon was not getting the pid assigned
This commit is contained in:
1 parent
e3ec53c3f3
commit
95a2093dc3
1 file changed
+7
-2
@@ -94,11 +94,16 @@ struct SniperLeg{
|
||||
|
||||
// Polygon representation, legs and its evaluation
|
||||
struct SniperPolygon{
|
||||
uint32_t pid;
|
||||
const uint32_t pid;
|
||||
std::vector<SniperLeg> legs;
|
||||
// last 2 computed values
|
||||
PriceQty prev_cross_value, curr_cross_value;
|
||||
|
||||
SniperPolygon(uint32_t pid)
|
||||
:
|
||||
pid(pid){
|
||||
}
|
||||
|
||||
bool has_working_order() const{
|
||||
for(const auto& l : legs)
|
||||
if(l.working_order.has_value())
|
||||
@@ -480,7 +485,7 @@ bool SniperAlgo::_onetime_setup(IBeforeLaunchAlgoServices& serv,
|
||||
// creates a SniperPolygon from a FilePolygon and
|
||||
// adds it to the state
|
||||
auto add_polygon = [&](const auto& file_poly){
|
||||
SniperPolygon rv;
|
||||
SniperPolygon rv(file_poly.pid);
|
||||
for (const auto& l : file_poly.legs){
|
||||
auto it = me->sec_map.find(l.resolved_key);
|
||||
bts_assert(it != me->sec_map.end());
|
||||
|
||||
Reference in new issue
Block a user