Tag Archives: Netbeans

Install Interactive Brokers TWS on Netbeans Java IDE on Apple Mac OSX

Here are some notes:

There is no sound to this video
So..lets get Interactive Brokers TWS working on this  Mac OS X
also ensure you have the JDK install to work properly. note that you need the Oracle Hotspot JDK not OpenJDK as there seems to be compatibility problems with TWS. ok?
do not download the OpenJDK so only download the Hotspot

for TWS, demo user=edemo password=demouser
We need to configure TWS to accept API connection from our software.

We need to install Eclipse IDE for Java. The CDT and Java versions could conflict

Download IB API from
http://interactivebrokers.github.io

We need to install the Interactive Broker Java Test Client
https://www.interactivebrokers.com/en/software/api/apiguide/java/running_the_java_test_client_program_with_eclipse.htm
http://ibkb.interactivebrokers.com/article/2484

Once downloaded, extract the JAR file by running in a terminal
jar xf myFile.jar

Follow instructions to install IB Test Client
https://www.interactivebrokers.com/en/software/api/apiguide/java/running_the_java_test_client_program_with_eclipse.htm

Netbeans maybe better IDE to work with in Mac OS X
Follow Netbeans install from Chapter 3 in

https://www.interactivebrokers.ca/download/JavaAPIGettingStarted.pdf

Join my FREE newsletter to learn more about installing IB TWS for automated trading

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

How to use Netbeans for C or C++ development

How to use Netbeans for C or C++ development

It looks like I am switching to Netbeans as my preferred C/C++ IDE instead of CLion

Here is how to switch to C/C++ with this plugin you need

https://netbeans.org/community/releases/80/cpp-setup-instructions.html

I prefer Netbeans also for my Java IDE as well vs Eclipse

Join my FREE newsletter to see how I use C/C++/Java for my automated trading 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Using Java Netbeans IDE Postgres database

Using Java Netbeans IDE Postgres database

This is a simple tutorial using this combination to get a database connection within Java with Hibernate ORM

Query to create primary key within Postgres

ALTER TABLE test.test.currency ADD PRIMARY KEY (ticker)

 

Usage examples from http://www.tutorialspoint.com/hibernate/hibernate_examples.htm

 

The way it is looking, this ain’t happening with a combo environment of: Java 8 Hibernate 4.3 with Netbean 8.02

I get this strange exception of:

warning: Supported source version 'RELEASE_6' from annotation processor 'org.eclipse.persistence.internal.jpa.modelgen.CanonicalModelProcessor' less than -source '1.8'
Note: Creating non-static metadata factory ...
C:\Program Files\NetBeans 8.0.2\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar(org/hibernate/internal/CoreMessageLogger.class): warning: Cannot find annotation method 'projectCode()' in type 'MessageLogger': class file for org.jboss.logging.annotations.MessageLogger not found
C:\Program Files\NetBeans 8.0.2\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar(org/hibernate/internal/CoreMessageLogger.class): warning: Cannot find annotation method 'level()' in type 'LogMessage': class file for org.jboss.logging.annotations.LogMessage not found
C:\Program Files\NetBeans 8.0.2\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar(org/hibernate/internal/CoreMessageLogger.class): warning: Cannot find annotation method 'value()' in type 'Message': class file for org.jboss.logging.annotations.Message not found
C:\Program Files\NetBeans 8.0.2\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar(org/hibernate/internal/CoreMessageLogger.class): warning: Cannot find annotation method 'id()' in type 'Message'
C:\Program Files\NetBeans 8.0.2\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar(org/hibernate/internal/CoreMessageLogger.class): warning: Cannot find annotation method 'level()' in type 'LogMessage'
C:\Program Files\NetBeans 8.0.2\java\modules\ext\hibernate4\hibernate-core-4.3.1.Final.jar(org/hibernate/internal/CoreMessageLogger.class): warning: Cannot find annotation method 'value()' in ty

UPDATE:
This is where Java can ruin your life with wasted effort of Mickey Mouse combo I really don’t like venturing into. As a result, I am dumping Hibernate and use the PostGresSQL driver directly to be used in Java stock exchange simulator. Also, I am revisiting the use of the Tradelink version I got build successfully. It looks like that idea of more Java and MAC is not looking to good at this point, back to more .NET and C# development frustration on Windows. Well at least it will be easier I hope than Java.

Join my FREE newsletter to learn more about Java 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Youtube video demo of debugging in C++ with Netbeans IDE on Windows and Cygwin Linux like tool

Youtube video demo of debugging in C++ with Netbeans IDE on Windows and Cygwin Linux like tool

http://quantlabs.net/membership.htm

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Neat: Remote C++ development on WIndows to Linux with this Netbeans tutorial

Neat: Remote C++ development on WIndows to Linux with this Netbeans tutorial

Here is another great posting from this really knowledgeable person HFT development

http://chrisdonnan.com/blog/2010/05/31/netbeans-cp-remote-development/

Check out my free newsletter I send out frequently as I send out my progress in this development on High Frequency Trading

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Netbeans much better IDE for C++ development as compared to Eclipse CDT

Netbeans much better IDE for C++ development as compared to Eclipse CDT

Eclipse Juno just had too many bugs to mention. It would not run the runtime after each build but Neatbeans seems ok with that. Just saying.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Youtube video: My open source C++ trading platform Shim for Ubuntu Linux with MYSQL and Netbeans IDE demo

Youtube video: My open source C++ trading platform Shim for Ubuntu Linux with MYSQL and Netbeans IDE demo

Here is my checklist of stuff:x , MYSQL , Netbeans ,IDE ,demo

Optional but required instructions below:
1. Install R onto Ubuntu
http://ubuntuforums.org/archive/index.php/t-702173.html
sudo apt-get update
sudo apt-get install r-base

Users who need to compile packages should also install the r-base-dev package
===
GNUPlot
Prerequisites

We need to make sure some packages are already installed before we try to compile gnuplot

libwxgtk2.8-dev – for the wxt terminal
libpango1.0-dev – for the cairo (pdf, png) and wxt terminals
libreadline5-dev – readline support (editing command lines)
libx11-dev and libxt-dev – X11 terminal
texinfo (optional) – needed for the tutorial
libgd2-xpm-dev (optional) – old png, jpeg and gif terminals based on libgd

This command (run in a terminal) will install all prerequisites if not already installed:

sudo apt-get install libwxgtk2.8-dev libpango1.0-dev libreadline5-dev libx11-dev libxt-dev texinfo libgd2-xpm-dev

Then we download and compile gnuplot (run each command/line in a terminal)

wget http://sourceforge.net/projects/gnuplot/files/gnuplot/4.4.0/gnuplot-4.4.0.tar.gz/download
tar xzf gnuplot-4.4.0.tar.gz
mkdir build && cd build
../gnuplot-4.4.0/configure –with-readline=gnu

Install Gnuplot 4.4.0 on Ubuntu Linux


Required for my Ubuntu Linux version:
g++
MYSQL:
sudo apt-get dist-upgrade:
sudo apt-get install mysql-server mysql-client
sudo mysqladmin -u root -h localhost password ‘mypassword’
sudo mysqladmin -u root -h myhostname password ‘mypassword’
http://ariejan.net/2007/12/12/how-to-install-mysql-on-ubuntudebian

Ruby: apt-get install ruby
To build Trading Shimm, you need the MYSQL developer RPM which is from dev.mysql.com/downloads/mysql/ or
sudo apt-get install libmysqlclient-dev
from http://ubuntuforums.org/showthread.php?t=637973

UPDATE: See below for proper installation for IB TWS in Ubuntu or any Linux/Unix
Install Interactive Brokers TWS for Ubuntu:
http://ubuntuforums.org/showthread.php?t=1344734
1. Make sure that you have a recent version of Java Runtime Environment installed.
2. Go to http://www.interactivebrokers.com/en…&ib_entity=llc and download the standalone app for unix.
3. Create a folder called “TWS” or “IB” or whatever you want in your home directory.
4. Find and right click the downlaoded file called “unixmacosx.jar” and select “Open with Archive Manager”
5. Select the two folders “IBJts” and “META-INF” and select extract
6. Navigate to the folder you just created in step 3 and extract the folders there.
7. Open up a terminal window and change directory to the folder where your IB files reside. e.g. “cd TWS” or “cd IB”
8. Change directory to the IBJts folder, “cd IBJts”
9 Then type
Code:

java -cp jts.jar:hsqldb.jar:jcommon-1.0.12.jar:jfreechart-1.0.9.jar:jhall.jar::KSother.jar:rss.jar -Xmx512M jclient.LoginFrame .

including the period at the end and you should get the login page.
10. Henceforth to launch TWS you have to follow steps 7-9
Log into TWS with:
userid: edemo
password: demouser
Run TWS and then execute ./shim
Get the Trading Shim manual from http://www.tradingshim.org/pdfs/manual.pdf
Configure TWS as explained in the TradingShim manu 3.2.2 Allow Connections to the IB tws. Go under Global Configurations
Load MYSQL data as described in the manual:
Make change to \etc\mysql\my.cnf (pg 41)
In MYSQL as root, run ‘source setup.sql’ from shim’s sql directory
May need to execute examples in ‘Using the create.sql Script to Recreate the Tables’ pg 44
create.sql under sql/mys
For debugging Trading shim, I would use Netbeans IDE for C++. Coulse markfile as source of Netbeans project when import source.

Update: For MYSQL Isolation level to seriazilable, do in MYSQL shell:

set global transaction isolation level serializable;

Update: (Oct 25/2012)

If you ever see any strange problems trying to run the JAR files for IB TWS, here is a set of references to help out:
http://ubuntuforums.org/showthread.php?t=1344734

http://www.interactivebrokers.com/en/control/systemstandalone.php?os=unix&ib_entity=llc

 

 

 

 

 

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!

Oracle and Sun Netbeans is proving to be a cool Java IDE as compared with Eclipse

Oracle and Sun Netbeans is proving to be a cool Java IDE as compared with Eclipse

I am liking it and it is very intuitive as compared to behemoth Eclipse. I am using the latest Netbeans which is 7.01.

HOW DO YOU START A PROFITABLE TRADING BUSINESS? Read more NOW >>>

NOTE I now post my TRADING ALERTS into my personal FACEBOOK ACCOUNT and TWITTER. Don't worry as I don't post stupid cat videos or what I eat!