From 481797cea768942e834e4405aa6fe225cb23847e Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sun, 27 May 2018 23:58:52 +0800 Subject: [PATCH] =?UTF-8?q?[Mod]=E4=BF=AE=E6=94=B9ctaHistoryData.py?= =?UTF-8?q?=E4=B8=AD=E7=9A=84=E6=A8=A1=E5=9D=97=E5=8A=A0=E8=BD=BD=E8=A7=84?= =?UTF-8?q?=E5=88=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vnpy/trader/app/ctaStrategy/ctaHistoryData.py | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/vnpy/trader/app/ctaStrategy/ctaHistoryData.py b/vnpy/trader/app/ctaStrategy/ctaHistoryData.py index 070a2cd6..aa49d82e 100644 --- a/vnpy/trader/app/ctaStrategy/ctaHistoryData.py +++ b/vnpy/trader/app/ctaStrategy/ctaHistoryData.py @@ -11,6 +11,7 @@ import csv from datetime import datetime, timedelta from time import time +from struct import unpack import pymongo @@ -73,8 +74,6 @@ def downloadEquityDailyBarts(self, symbol): #---------------------------------------------------------------------- def loadMcCsv(fileName, dbName, symbol): """将Multicharts导出的csv格式的历史数据插入到Mongo数据库中""" - import csv - start = time() print u'开始读取CSV文件%s中的数据插入到%s的%s中' %(fileName, dbName, symbol) @@ -107,8 +106,6 @@ def loadMcCsv(fileName, dbName, symbol): #---------------------------------------------------------------------- def loadTbCsv(fileName, dbName, symbol): """将TradeBlazer导出的csv格式的历史分钟数据插入到Mongo数据库中""" - import csv - start = time() print u'开始读取CSV文件%s中的数据插入到%s的%s中' %(fileName, dbName, symbol) @@ -142,8 +139,6 @@ def loadTbCsv(fileName, dbName, symbol): #---------------------------------------------------------------------- def loadTbPlusCsv(fileName, dbName, symbol): """将TB极速版导出的csv格式的历史分钟数据插入到Mongo数据库中""" - import csv - start = time() print u'开始读取CSV文件%s中的数据插入到%s的%s中' %(fileName, dbName, symbol) @@ -189,8 +184,6 @@ def loadTbPlusCsv(fileName, dbName, symbol): """ def loadTdxCsv(fileName, dbName, symbol): """将通达信导出的csv格式的历史分钟数据插入到Mongo数据库中""" - import csv - start = time() date_correct = "" print u'开始读取CSV文件%s中的数据插入到%s的%s中' %(fileName, dbName, symbol) @@ -236,8 +229,6 @@ def loadTdxCsv(fileName, dbName, symbol): """ def loadTdxLc1(fileName, dbName, symbol): """将通达信导出的lc1格式的历史分钟数据插入到Mongo数据库中""" - from struct import * - start = time() print u'开始读取通达信Lc1文件%s中的数据插入到%s的%s中' %(fileName, dbName, symbol)