676c4c6d40
Conflicts: .gitignore vn.trader/CTP_connect.json vn.trader/ContractData.vt vn.trader/LTS_connect.json vn.trader/ctaEngine.py vn.trader/ctaStrategies.py vn.trader/ctaStrategyTemplate.py vn.trader/ctpGateway.py vn.trader/ltsGateway.py vn.trader/uiBasicWidget.py vn.trader/uiCtaWidget.py vn.trader/uiMainWindow.py vn.trader/vtConstant.py vn.trader/vtEngine.py vn.trader/vtGateway.py
47 lines
867 B
SQL
47 lines
867 B
SQL
use BackTest;
|
|
|
|
CREATE TABLE `TB_Trade` (
|
|
`Id` varchar(255) DEFAULT NULL,
|
|
`symbol` varchar(20) DEFAULT NULL,
|
|
`orderRef` int(11) DEFAULT '0',
|
|
`tradeID` int(11) DEFAULT '0',
|
|
`direction` tinyint(4) DEFAULT NULL,
|
|
`offset` tinyint(4) DEFAULT NULL,
|
|
`price` float DEFAULT NULL,
|
|
`volume` int(11) DEFAULT NULL,
|
|
`tradeTime` datetime DEFAULT NULL,
|
|
`amount` float DEFAULT '0',
|
|
`fee` float DEFAULT '0',
|
|
`profit` float DEFAULT '0',
|
|
`profitRate` float DEFAULT '0'
|
|
)
|
|
|
|
create table TB_Bar
|
|
(
|
|
Id varchar(255),
|
|
symbol varchar(20),
|
|
open float,
|
|
high float,
|
|
low float,
|
|
close float,
|
|
date date,
|
|
time time,
|
|
datetime datetime,
|
|
volume long,
|
|
openInterest long
|
|
|
|
);
|
|
|
|
create table TB_Ema
|
|
(
|
|
Id varchar(255),
|
|
symbol varchar(20),
|
|
fastEMA float,
|
|
slowEMA float,
|
|
date date,
|
|
time time,
|
|
datetime datetime
|
|
|
|
);
|
|
|