You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the following modification, it will get the bug fixed., "LOGI("on_start id:{} code:{}", id_, context_.feed->config_.code);" where " context_.feed"is empty, in the method "void StrategyCD::on_start(void)",
ctx.strategy = func_get_strategy_();
ctx.strategy->set_id(id);
ctx.strategy->init(ctx.broker);
**//comment out 09/04/2024
//ctx.strategy->set_context(ctx);**
if (id == 0) {
ctx.strategy->on_create(config_);
}
ctx.broker->init(config_.broker);
struct feed_config feed_cfg = config_.feed;
if (config_.codes.size() > 0) {
feed_cfg.code = config_.[codes.at](http://codes.at/)(id);
}
ctx.feed = mcache::get_feed(feed_cfg);
//after feed init
ctx.data->setup(ctx.broker, ctx.feed, config_.plot);
ctx.data->setup_plot(config_.func.plot);
ctx.strategy->set_code(config_.[codes.at](http://codes.at/)(id));
**//09/07/2024, get to this position to make changes of ctx to visible to ctx.strategy**
ctx.strategy->set_context(ctx);
context_vector_.push_back(ctx);
if (id == 0) {
context_ = ctx;
}
}
The text was updated successfully, but these errors were encountered:
With the following modification, it will get the bug fixed., "LOGI("on_start id:{} code:{}", id_, context_.feed->config_.code);" where " context_.feed"is empty, in the method "void StrategyCD::on_start(void)",
void Backtest::make_strategy(uint32_t id)
{
struct BtContext ctx;
ctx.broker = std::make_shared();
ctx.stat = std::make_shared();
ctx.data = std::make_shared();
ctx.stat->init(ctx.broker, ctx.data);
}
The text was updated successfully, but these errors were encountered: