Monthly Archives: September 2015

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

 

Improved Karen Supertrader Strategy with Fibonacci and Bollinger with C source code

Improved Karen Supertrader Strategy with Fibonacci and Bollinger with C source code

Here is the source code with the bollingFib.slx Simulink model

Refer to the lastPriceERT_ert_rtw for the generated C Source code

Download here karen

 

Working demo of Simulink code generated C source with Interactive Brokers data Java via fast Redis message queue

Working demo of Simulink code generated C source with Interactive Brokers data Java via fast Redis message queue

Follow instructions in source code video walkthrough

 

Get Java source code here:

Source code of Interactive Brokers Java API with Redis NOSQL on Ubuntu Linux

C source code: SimulinkModelTest.tar

 

MySQL demo with Matlab C Java in Ubuntu Linux source files

Here are the instructions to

C: http://zetcode.com/db/mysqlc/

Java: http://quantlabs.net/blog/2015/09/java-instructions-for-mysql-and-ubuntu-linux/

Netbeans project file: TestIBTWS.tar

C files: mysql-connector-java-5.1.36.tar

Code for Matlab:

>> conn = database(‘testdb’,’root’,’Hello123_’,’/home/caustic/DB_Drivers/mysql-connector-java-5.1.36-bin.jar’,’jdbc:mysql://localhost/testdb’);

query=’select * from Cars’;

x=fetch(conn,query)