Tag Archives: connector

Good Linux connector for PostgreSQL to C++

Good Linux connector forPostgreSQL to C++

NOTE: Video and source code examples posted here https://quantlabs.net/blog/2015/08/postgresql-demo-with-cpp-on-ubuntu-linux/

Please see my video below to walk you through this process

I am now faced with this dilemma. There was a decent one a few years ago for C++ but I need an updated one to keep up with version changes in Postgres. Here is what I found:

http://stackoverflow.com/questions/1138503/good-c-c-connector-library-for-postgresql

http://www.tutorialspoint.com/postgresql/postgresql_c_cpp.htm

For the above link: use sudo ./configure (if you have permission access problems so run ‘sudo’ as well)

This is where my pg_hba.conf installed:

./etc/postgresql/9.3/main/pg_hba.conf

Create a PostgreSQL user with password and database to connect with as described here:

http://www.postgresql.org/docs/8.0/static/sql-alteruser.html

Start Postgres as explained here:

https://www.digitalocean.com/community/tutorials/how-to-install-and-use-postgresql-on-ubuntu-14-04

In a terminal run:

sudo -i -u postgres
psql


I create a new user within Postgres and update connection changes in the C++ files:

 

New

CREATE USER test WITH PASSWORD ‘test123’;

———

You could also create a database user or table via:

http://www.cyberciti.biz/faq/howto-add-postgresql-user-account/

new Ubuntu Linux users pgtest or pgtest with password Hello123_

In Postgres:
CREATE USER pgtest WITH PASSWORD ‘Hello123_’;
CREATE USER testpg WITH PASSWORD ‘Hello123_’;
CREATE DATABASE testdb
GRANT ALL PRIVILEGES ON DATABASE testdb to testpg;

THen
root@ubuntu:~# su – testpg
testpg@ubuntu:~$ psql -d testdb -U testpg
psql (9.3.9)
Type “help” for help.

testdb=>
Join my FREE newsletter to see how I use PostgreSQL database for 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!

Working Interactive Brokers CSharp open source connector

Working Interactive Brokers CSharp open source connector

This is an important project that seems to work after numerous years. My third party library expired so I decided not to renew if there is this free one

As always thanks to the author but this project was very helpful: https://github.com/krs43/ib-csharp

This library looks quite complete and actually works on initial build.

Join my FREE newsletter to learn how I will implement this project into my trading environment

 

 

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!

No MYSQL database needed, use Matlab Datafeed connector with FREE Yahoo or IQFeed for market data for SImulink trading model

No MYSQL database needed, use Matlab Datafeed connector with FREE Yahoo or IQFeed for market data for SImulink trading model

Now it appears I actually don’t need a database connection like MYSQL. I can just use the Matlab Datafeed Toolbox using IQFeed or Yahoo as a source. You can also use Bloomberg or Reuters as another set of options as well. It just depends what you can afford. Of course, this will get ‘streamed’ in to a Matlab workspace matrix much easier with one less layer like a database. Crap, why did I not just think of this earlier? Also, we can worry about integrating the code generated c++ Simulink model  with the IQFeed APi. Let’s just some simple trading models built with Simulnk first shan’t we?

Interested in learning more? Join my FREE newsletter

 

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!

Is the ActiveQuant example issues worth pursuing? For sure if you need to learn Interactive Broker connector or Open Tick adapters

Is the ActiveQuant example issues worth pursuing? For sure if you need to learn Interactive Broker connector or Open Tick adapters
I type in ActiveQuant tutorial, it seems there are many gripes against the framework for live examples. As compared to Marketcetera, I was able to successfully implement their Ruby trading strategies. This was thankfully due to their YouTube channel which got me up and running pretty quickly.
As for ActiveQuant, I have hit nothing but headaches when I try to run the imported into code. I am using of course Eclipse but it seems to throw all kinds of exceptions. As it stands, I am following the instructions for both Two Minute Tutorial under Documentation at the framework’s new home of ActiveStocks.eu. The old home still exists at activequant.org but it seems to have moved.
The Two Minute Tutorial seems to be easy to work with until you need to do some tweaks to ensure the Simple Back test java file can see the configuration files. I get exceptions but I would have thought this tutorial would run flawlessly. Nope so don’t expect that unless you are willing to spend a few extra minutes or hours to get something running.
The online documentation seems kind of scant where they assume you know what you are doing. Maybe, but it does not seem they are making easy for people new to Eclipse or Java or even Spring. ActiveQuant leverages pretty heavily off of Spring so know it before tinkering with this framework.
Outside of these gripes, I was able to install Active Quant code with no issue using their 122107 version when checking out of Subversion. Do note there are tonnes of Eclipse warning and errors when trying to import more recent versions. I do believe there was one more recent version which appeared to be stable but had Eclipse issues when checking it out.
The feature set does make it worthwhile in pursuing Active Quant as a potential framework to work with for your algo based high performance system. Just be prepared to work with it and be VERY patient. This is the only framework showing examples of how to import Yahoo, Open Tick, and Interactive Brokers connector and adapters. You need to buy the commercial version of Marketcetera to make that happen. You might learn how to write your own for Marketcetera using the one found in Active Quant. Again, this is worth it.
As for framework momentum, I do believe that documentation will need to be radically improved to have it mainstream. This is how Java frameworks like Hibernate, Struts, and Spring made it. There was a very supportive community that made life easier for the newbies working with these. Let’s hope ActiveQaunt can make that happen.

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!