vnpy/vn.data/mysqldb.sql

47 lines
867 B
MySQL
Raw Normal View History

2015-10-14 16:41:45 +00:00
use BackTest;
2015-10-19 08:42:17 +00:00
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'
)
2015-10-19 08:42:17 +00:00
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
2015-10-14 16:41:45 +00:00
(
Id varchar(255),
symbol varchar(20),
2015-10-19 08:42:17 +00:00
fastEMA float,
slowEMA float,
date date,
time time,
datetime datetime
);