B Trader

remarks on building a trading application on linux

Trader updates (sqlite)

leave a comment »

I made a couple of changes to the way the technical charts were displayed. I had always wanted to provide the user a way to query the data by periods. This really should be done with stored procedures and I was eager and looking forward to it till I remembered that sqlite doesn’t support them!

I have the source code for sqlite since I’m using the amalgamated version because I need to write some of my own functions to load either as dynamic shared libraries or statically linked into the code (I prefer the latter). I spent a while reading through the code and btrees for a while thinking of a clever way to do it and then I had an “Aha!” moment. I can simply do this in C++! A few enums, a couple of classes and some simple ternary lines and presto I’ve got it working. Was much quicker and more efficient than adding my own code, which would’ve had to be thoroughly tested in a multithreaded environment to make make sure it really worked.

I like how it turned out and I have one more screenshot to show :)

New Screenshot

New Screenshot

Now I need to do some more code generation.

Advertisement

Written by badimo

October 3, 2008 at 11:15 am

Posted in C++, cairo, finance, gtk+, linux, ta-lib

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.