void on_bars(const datetime_t& datetime, const values_t& bars) { log_trace("StrategyTest::{}", __func__); try { const value_t& bar = bars.at(symbol); log_debug("StrategyTest::{} {}", __func__, bar); } catch (std::exception& e) { log_error("StrategyTest::{} {}", __func__, e.what()); } }
template <typename T> Value const& operator[](T&& key) const { return values.at(std::forward<T>(key)); }