This commit is contained in:
msincenselee 2017-06-16 08:39:31 +08:00
parent b942d33388
commit 7c476badd9
2 changed files with 5 additions and 6 deletions

View File

@ -5,7 +5,7 @@
''' '''
from __future__ import division from __future__ import division
print 'load ctaBase.py'
# 常量定义 # 常量定义
# CTA引擎中涉及到的交易方向类型 # CTA引擎中涉及到的交易方向类型
@ -54,8 +54,6 @@ MINUTE_DB_NAME = 'VnTrader_1Min_Db'
ENGINETYPE_BACKTESTING = 'backtesting' # 回测 ENGINETYPE_BACKTESTING = 'backtesting' # 回测
ENGINETYPE_TRADING = 'trading' # 实盘 ENGINETYPE_TRADING = 'trading' # 实盘
import sys
import os
# CTA引擎中涉及的数据类定义 # CTA引擎中涉及的数据类定义
from vnpy.trader.vtConstant import * from vnpy.trader.vtConstant import *

View File

@ -20,6 +20,7 @@
''' '''
print 'load ctaEngine.py'
import json import json
import os import os
import traceback import traceback
@ -28,14 +29,14 @@ from datetime import datetime, timedelta
import logging import logging
import re import re
from ctaBase import *
from strategy import STRATEGY_CLASS
from vnpy.trader.vtEvent import * from vnpy.trader.vtEvent import *
from vnpy.trader.vtConstant import * from vnpy.trader.vtConstant import *
from vnpy.trader.vtGateway import VtSubscribeReq, VtOrderReq, VtCancelOrderReq, VtLogData from vnpy.trader.vtGateway import VtSubscribeReq, VtOrderReq, VtCancelOrderReq, VtLogData
from vnpy.trader.vtFunction import todayDate from vnpy.trader.vtFunction import todayDate
from vnpy.trader.app.ctaStrategy.ctaBase import *
# 加载 strategy目录下所有的策略
from vnpy.trader.app.ctaStrategy.strategy import STRATEGY_CLASS
######################################################################## ########################################################################
class CtaEngine(object): class CtaEngine(object):