Tag Archives: Postgres

PostGres SQL in Docker but I use NOSQL

PostGres SQL in Docker but I use NOSQL

From Super Fan Nuno who sent this but I must say I am now using NOSQL MongoDB as I my choice for persistance. See my video playlist below on why. Thanks to Nuno

Persistent PostgreSQL inside Docker

Join my FREE newsletter to learn how I use NOSQL 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!

PostGres SQL scares me on Mac OS X

PostGres SQL scares me on Mac OS X

Here is why with this dumb error message. It just happened out of the blue or from a Brew Uprade. Either way, it is not safe to use nor stable.  As a result I am going back SQLite. This will be useful for my very old Mac Minis as SQLite is much smaller compared to PostGres

http://stackoverflow.com/questions/8465508/can-not-connect-to-local-postgresql

http://stackoverflow.com/questions/8465508/can-not-connect-to-local-postgresql

http://stackoverflow.com/questions/10763143/in-rails-couldnt-create-database-for-adapter-postgresql/19609228#19609228

Ugh. See which databases I use for my automated trading by joining 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!

Walkthru of Karen Super Trader strategy with CSharp Postgres SQL IQFeed and IB

Walkthru of Karen Super Trader strategy with CSharp Postgres SQL IQFeed and Interactive Brokers

I have finally finished off the new Karen Super Trader strategy in .Net with IQFeed and Interactive Brokers connectivity I have completed an entire 45 minute walk through video of the entire code.

 

Go here to see the video

 

LIVE Q&A Meetup: Walkthru of Karen Super Trader strategy with source code

I will also be scheduling a LIVE Meetup event to handle all your questions and answers next Monday. This is the only time where I will be able to do it so please attend.  Do note that I will not be having any video playback at all which is exclusively only for my Quant Elite members.

 

Go here to see the details of this event online

 

Lastly, if you are interested in retrieving the code:

 

Go here for immediate access

 

If you’re not familiar with my Quant elite membership, go here for details and benefits

 

Thanks for reading

 

Bryan

 

PS. I just posted last night’s webinar on the tools that I use for both IQFeed and Interactive Brokers TWS

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!

Walkthru of Karen Super Trader strategy with CSharp Postgres SQL IQFeed and Interactive Brokers

Walkthru of Karen Super Trader strategy with CSharp Postgres SQL IQFeed and Interactive Brokers

Finally it has been pulled together to complete this potential real world trading strategy. This C# code has been posted for my Quant Elite Members. You can use this as role model for your own trading strategies or algorithms!

Join my FREE newsletter to learn more about this code for your automated trading systems 

Complete walkthrough

Part 1 is here

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!

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!

PostGres SQL GUI client choices

PostGres SQL GUI client choices

Here are some front end GUI choices. I use Razor which is ok but looking for something a little more slick like MYSQL Workbench

https://wiki.postgresql.org/wiki/Community_Guide_to_PostgreSQL_GUI_Tools

Join my FREE newsletter to learn more on what tool I end up using

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!

Best charts for your open source database? MySQL Postgres?

Best charts for your open source database? MySQL Postgres?

I got this sent over from someone via email who says this may be a good choice for visualizing your data. Thanks to him for sending

Periscope

Type SQL, Get Charts

Periscope plugs directly into your databases and lets you run and share analyses over billions of data rows in seconds

https://www.periscope.io/

Join my FREE newsletter to see how I implement my trading database in PostgreSQL

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!

Intro to my Postgres SQL trading database

Intro to my Postgres SQL trading database

Who wants the complete data set of the thousands of instruments I could track

http://razorsql.com/register.html

The database scheme mentioned can be downloaded from my Quant ELITE members section, info here:

Become part of our ELITE training include our NEW FUTURE systematic trading models. BE AN ELITE HERE

Join my FREE newsletter to learn more about this database implementation 

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!

I found a decent PostGres SQL manager tool

I  found a decent PostGres SQL manager tool

Much better than Razor SQL

http://www.sqlmanager.net/en/products/postgresql/manager/buy

Join my FREE newsletter to learn more about using Postgres 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!

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!