Example #1
0
 def __init__(self, param, account, is_backtesting=False):
     """回测时需要删除serial文件"""
     self.prices_traded = PrePriceList()  #类实例
     self.code,self.first_buy_price, self.end_sell_price, self.first_buy_num, \
         self.qj_price_bilv, self.qj_num_bilv = param
     #重新根据记录来初始化参数
     self.fpath = help.getPythonPath() + "/datas/qjjy/"
     if is_backtesting:
         self.fpath += "back/"
     else:
         self.fpath += "live/"
     self.fpath += self.code + ".serial"
     self.unserial()
     self._genQjPrice()
     self.account = account
     if 0: self.account = Strategy(data).data
Example #2
0
 def DelSerial(code):
     """当回测时需要先删除serial"""
     fpath = help.getPythonPath() + "/datas/qjjy/back/" + code + ".serial"
     if help.FileExist(fpath):
         help.FileDelete(fpath)