Tag Archives: Demo

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

 

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)

 

Redis demo with Simulink code generated C++ in Ubuntu Linux with source code

Redis demo with Simulink code generated C++ in Ubuntu Linux with source code

This is a complete demo of using Simulink code generated C++ with  Redis client code to showcase a hook into a Redis Server instance.

NOTE: This has to remain in Linux since Redis has unreliable support for Windows versions. It is also note updated for Windows versions as well as described in the video

Continue reading