def sync_data(self):
    '同步更新数据'
    if (not self.backtesting):
        self.write_log(u'保存k线缓存数据')
        self.save_klines_to_cache()
    if (self.inited and self.trading):
        self.write_log(u'保存policy数据')
        self.policy.save()
同步更新数据
def sync_data(self):
    
    if (not self.backtesting):
        self.write_log(u'保存k线缓存数据')
        self.save_klines_to_cache()
    if (self.inited and self.trading):
        self.write_log(u'保存policy数据')
        self.policy.save()