TBPY例子:双均线交易,为什么没有on_bar事件的打印信息
https://tbpy.tbquant.net/helper?product_id=810&keyword=3606&content_id=2433&selectedkey=3684&type=article 以上是原文,看源代码如下,我在非交易时间允许代码 def on_bar(self, context, bars, symbol, flag): print(bars[len(bars)-1])代码输出一直如下。从输出看,应该是初始化成功了,但为什么没有On_Bar事件的驱动?on_init success.Position(broker_id =482, account_id = 66121741, symbol = rb2605.SHFE, l_current_volume=0, l_yesterday_volume=0, l_active_volume=0, l_active_close_volume=0, l_can_sell_volume=0, l_market_value=0.000000, l_avg_price=0.000000, l_float_porfit=0.000000, l_avg_price_o=0.000000, l_float_porfit_o=0.000000, l_use_margin_amount=0.000000, s_current_volume=5, s_yesterday_volume=5, s_active_volume=0, s_active_close_volume=0, s_can_cover_volume=5, s_market_value=153400.000000, s_avg_price=3070.000000, s_float_porfit=100.000000, s_avg_price_o=3157.200000, s_float_porfit_o=4460.000000, s_use_margin_amount=16117.500000)