Tag Archives: Database Table

Demo MySQL C Insert Java Select with Positions Database Table

Demo MySQL C Insert Java Select with Positions Database Table

Demos of C and Java Interactive Brokers

Source files

Java: MySQLPosition.tar

C: SimulinkModelTest.tar

 

Here is the MYSQL Position table CREATE statement:

CREATE TABLE `Positions` (
`idPositions` int(11) NOT NULL DEFAULT ‘0’,
`shortSymbol` int(11) DEFAULT NULL,
`shortEntryTS` timestamp NULL DEFAULT NULL,
` shortEntryPrice` decimal(10,4) DEFAULT NULL,
`shortStopLossPer` decimal(3,2) DEFAULT NULL,
`shortSoftTargetPerc` decimal(3,2) DEFAULT NULL,
`longSymbol` int(11) DEFAULT NULL,
`Positionscol` varchar(45) DEFAULT NULL,
`longEntryTS` timestamp NULL DEFAULT NULL,
`longEntryPrice` decimal(10,4) DEFAULT NULL,
`longStopLossPer` decimal(3,2) DEFAULT NULL,
`longSoftTargetPerc` decimal(3,2) DEFAULT NULL,
`shortExitTS` timestamp NULL DEFAULT NULL,
`shortExitPrice` decimal(10,4) DEFAULT NULL,
`longExitTS` timestamp NULL DEFAULT NULL,
`longExitPrice` decimal(10,4) DEFAULT NULL,
`shortQty` int(11) DEFAULT NULL,
`longQty` int(11) DEFAULT NULL,
`shortBeta` decimal(4,4) DEFAULT NULL,
`shortLong` decimal(4,4) DEFAULT NULL,
PRIMARY KEY (`idPositions`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
select * from Positions