8 years at Trading Technologies

I just noticed it has been a whole 8 years since I started working for Trading Technologies. I was hired fresh out of college and began my journey on May 15, 2006 (well, I did some consulting on the side before coming to ChiTown).


Company logo when I started


New TT logo

New TT logo



During my career at TT, I pretty much worked on everything the company has to offer.

I spent countless hours massaging our flagship X_TRADER product. I was a key player in bringing .NET into the program and integrating it with native C++ and MFC. This really made adding new windows easier (have you ever had to deal with Win32/MFC?!) and allowed for tight X_STUDY integration.

X_TRADER's .NET toolbar

X_TRADER’s .NET toolbar. Click for larger image


In order to achieve maximum performance, I completely rewrote the Time & Sales window. Both the stand-alone and one integrated into MD Trader. While working on T&S I learned a lot about grids and data virtualization.

Time & Sales window

Blazing fast Time & Sales window with the default (butt-ugly) X_TRADER color scheme


Every trader who’s copying/pasting links to and from Microsoft Excel goes through my Link Manager. That was a very fun project which definitely provided a ton of value for our customers. There are thousands of traders who design their strategies in Excel spreadsheets and want their numbers to be shown on grids, charts, ladders and algos. And this works both ways – I allow them to copy cells from X_TRADER and insert them into Excel. The data flows flawlessly and everything just magically works.

X_STUDY OLE linking

Look ma! I has Excel linkage! (Click for larger image)

For fun I also added preview to the Color settings window, which finally made it usable.
I wrote so many things for X_TRADER that I actually lost track. Not to mention countless prototypes to fool around with new features. Definitely good times 🙂


I am the architect and author of TT API – our high performance trading API for Windows. It was a great few years designing and implementing all the different features. I certainly learned a lot. TT API lets you trade any exchange that TT supports, including Autospreader SE and Synthetic SE engines. You can really go to town. Just check out TT API samples on GitHub.

It’s also worth mentioning that internally our Algo SE server and ADL (Algo Design Lab) are both powered by my TT API.


Two years ago I was selected to start on TT’s future platform. The codename for it used to be “Nextrader“, but due to trademark conflicts a new name was chosen. I coined the name and designed many low-level communication and security details (EdgeServer-to-client path, authorization, protocols, etc) which are now the foundation of the new system. I also led and directed the client-side team.  The TT platform is written from the ground up using modern technologies. It’s optimized for speed. Trust me – you will feel it 🙂

In addition to web-based interface, TT Platform will ship with an Android mobile app. That’s another one of my babies. I designed the flow and general layout of the main screens for both phone and tablet form factors. Our in-house designer Kevin made them look awesome. I’m sure you will love it! Working on mobile is challenging, as it forces you to think from a different perspective and face a whole new set of problems. Limited screen real-estate, battery life, disconnect scenarios, butt dialing (or shall I say: butt trading) are all issues you have to deal with. I had a blast 🙂

Side menu

“Nextrader” for Android prototype. Side menu. Click for larger image. The name has since been changed to “TT Mobile”.


MD Trader on Android

TT Mobile for Android. MD Trader on a phone. Click for larger picture.


I started writing iOS version of TT Mobile with my team, but I didn’t get too far (enough to master Objective-C). I was needed on the new Algo project. Currently I am working with Andrew Gottemoller on our next-generation trading API, which we internally call TT SDK. The plan is to allow our customers to hand-craft their algos and run them in our co-lo facilities for minimum latency and maximum speed.


TT SDK is lean. It is fast. Linux and plain C. It is powerful, yet feels delightfully simple.  In addition to C we will eventually provide wrappers for higher-level languages. I, naturally, already have a C++14 and Mono C# version going. Stay tuned!


As you see, I’ve been having fun. Trading Technologies is a great company, but its most important asset are definitely the people. Everyone is smart and easy-going. I made many good friends at TT and I’m happy to see them every day.
Let’s see what the future will bring 🙂

SafeBuffer and UnmanagedMemoryStream

At work I have a situation where I have some binary data allocated in the native code. It’s pretty much a raw char*. I then would like to access that same information from the managed side. But how? Of course I can just copy the data to a byte[] but that’s just wasteful.

I did some googling around and found the obvious solution – UnmanagedMemoryStream. It can take pointers, or a SafeBuffer. The latter is basically a smart wrapper around memory handle. Take a look at the code I came up with. I hope somebody will find it useful. It’s still work in progress and can use some love, so any comments are welcome.

I needed to pass the std::unique_ptr as r-value, otherwise the linker complains (thunks for non-existent copy constructor). I still need to clean this code up to handle custom deleters. But it serves my needs for now.

Edit: There is a bug in this code. Can you spot it? 😉

Async keyword alternative

Unfortunately, both MonoTouch and Mono for Android still don’t support the async keyword. Raw TPL is rather inconvenient to use. You have to remember to catch exceptions, return faulted tasks, etc. ContinueWith can also be inefficient due to thread switching.

Today while browsing the interwebs I came across Brad Wilson’s blog post which led me to these two files. TaskHelpers are (no pun intended) very very helpful! The extension methods emulate the await goodness pretty well.

I modified them a little bit. Here is a gist.

Mo Calc “clone” detected

I was checking up on Mo Calc over at Windows Phone 7 marketplace today and I came across an interesting finance app.

It’s called Loanster. Check out these screenshots below:

Loanster - cheap Mo Calc clone Loanster - cheap Mo Calc clone Loanster - cheap Mo Calc clone Loanster - cheap Mo Calc clone

Despite drawing inspiration from Mo Calc, I am assured that Loanster is a completly legit and independently written app. Its author Tony was nice enough and agreed to tweak the UI in the next version in order to differentiate Loanster from Mo Calc a bit more.

Mo Calc 1.2 released

I finally had some time to release a much-needed update to my free mortgage calculator for Window Phone 7. Mo Calc 1.2 sports a new payment summary page with pie charts to better visualize payments structure.

I also revamped the comparison page. I decided to hide the detailed numbers and only display the monthly and total payments, in order to fit more items on the screen. The details are still available – just click “show details” to expand them.

Mortgage payment charts Side-by-side mortgage comparison New About page

I felt that the amortization table was pretty useless in the previous version. Who wants to scroll through 360 months of rows to see just a bunch of numbers? My plan is to gradually start improving it and making it more user-friendly. Version 1.2 has a “quick jump” capability (alike the people hub in Windows Phone 7) allowing quick hop to a designated year. Click on the year header to activate it.

Amortization table Quickly jump to amortization years Splash screen image

There were also other miscellaneous improvements that made it to this version. Here is the list:

Version 1.2

  • Improved payment summary page
  • Added pie charts
  • Improved amortization table
  • Using large numeric keyboard for number input
  • Added collapsible details for mortgage comparisons
  • Performance improvements and bug fixes
  • New icon and splash screen
  • New About page
Update: Looks like I made a simple “copy and paste” error and both charts are the same. Thank you TheManOfSteel27 for pointing that out. I already submitted an update to the Marketplace. Now just waiting for Microsoft to approve it.


Microsoft’s redemption

Yesterday Microsoft finally reactivated my App Hub account so I was able to publish a long overdue Mo Calc update. It did take them a whole week and I still don’t know what the issue was in the first place. I guess at this point I don’t really care. To sweeten the deal Microsoft reimbursed my money and pre-paid the $99 for a yearly App Hub membership. That, plus my app was approved after only a few hours. Call me satisfied.


WP7 App Search via Bing

Bing offers a nice way of searching for Windows Phone 7 apps, called “Visual Search”. I have noticed that the results are a little bit outdated compared to the Zune client but, nonetheless it’s a cool tool for browsing.

Here’s a link to the Finance apps.

Note: The problem is that Marketplace search only includes titles! The descriptions and metadata are not searched. Sounds like another glitch to me.

First Windows Phone 7 App

As you undoubtedly heard from my posts on Twitter, I have published my very first Windows Phone 7 app. Yes, you guessed it right – it’s a mortgage calculator called Mo Calc.

Dev Experience

I wanted to see if Microsoft’s promise of reusing existing Silverlight code on the phone was true. Indeed it was, but mainly for the business logic. The unique space constrains of a phone screen pretty much required a brand new UI. I was glad my old code followed the MVVM pattern – I was able to quickly use databinding and get the new UI of the ground.

I really enjoyed styling the interface in Blend. Microsoft did an awesome job on this front. Visual design makes writing apps much quicker, even quicker than on Android. You don’t have to deploy to the device/emulator to see how your UI will look like.

The APIs feel fine as well – every .NET dev will be at home. That said, I must say I personally like the “intent” model of Android better that Silverlight’s web-like “navigation” model. But that’s just my personal opinion. I’m still giving WP7 dev experience very high marks.

Cool Cool Cool

Below are some screenshots from version of Mo Calc.

Home screen with multiple mortgages Screen for adding or editing mortgages. The estimated payment is auto-updated with each change. Mortgage comparison - graph showing monthly payments

Marketplace Experience

Unlink Apple, Microsoft has published clear guidelines of what is allowed and what is not. It was nice to be able to read a document outlining all the things that are considered during the certification process. I chose to make my Mo Calc free and make money from ads. Microsoft allows 5 free app submissions.
Publishing Mo Calc through the website was very easy; a typical “wizard” experience. I was told the approval may take as long as five days, but my app got into the market just after 18 hours. Nice! 

Cool Cool Cool

The Bad and Ugly

While the quick submission turnaround time was certainly impressive, Microsoft managed to frustrate the heck out of me.

Right after my app made it to the market, I received a confirmation email stating that my marketplace account had been cancelled. Wait, what?
You read it right. The money was refunded to me, and I can no longer log in. Why did this happen? Nobody knows.

I have been calling MS tech support every day since, but was told that it may take more than a week to get my account reinstated. Very, very frustrating!

Meanwhile, my app is available in the marketplace. I have since found a few bugs and issues (ex. the ads are not showing, so I am not making any money) that I would like to fix, but I cannot access my account. Thanks Microsoft. I just hope that no one gives my app negative feedback for the glitches.

I’m really hoping my account gets reinstated soon…

Surprised Yell Cry