TT Platform finally out!

So it finally happened! After all these years of hard work designing, implementing, and unnecessary re-writes (thanks Rick), the TT Platform is finally a go. This is very exciting! Now anybody can sign up and try out my TT Mobile client and enjoy the cloud trading experience. Great job team!

Take a look at the official announcement page.

While I wasn’t able to find a link for the TT SDK download, I am certain that it will become available soon. I had a lot of fun working on the Algo Team, especially on TT SDK. It is the foundation of everything algo-related, including ADL. My friends who left TT are joking we should start offering TT SDK consulting services, since we are the ones who created it. That is actually not a far-fetched idea. Stay tuned 😉

TT Mobile showcase

My friends at TT are really busy trying to get the mobile clients out the door and into production. TT’s twitter account is buzzing with all kinds of photos and videos. I am really happy and proud of how far my apps have come. The end result is looking beautiful and I am sure the end-users will be delighted by both the design and functionality.

I really enjoyed working on TT Mobile, as it presented a very unique set of challenges. How to effectively push price updates over potentially slow cellular connections? How to ensure users don’t accidentally place trades (butt trading anyone)? And how to effectively integrate with the rest of TT’s eco-system? I think the team did a splendid job and the apps are rock solid. One disappointing fact is that both Android and iOS apps could have been released over a year ago, had we chosen to re-use logic. There are ways to write the code once, and use it verbatim on multiple mobile platforms (naturally the look-and-feel needs to be done separately, so that the app feels “native”). I have long argued with the executives and advocated for shared business logic, since it seemed like a no-brainer.

  • Shorter time-to-market. In today’s fast-moving world it’s imperative to be there first.
  • Lower cost of development.
  • Less bugs.
  • Parallel releases on multiple platforms.
  • Lower long-term maintenance costs.
  • Less testing effort.

Other companies are not as short-sighted and have long recognized the benefits of writing the common logic once, instead of re-implementing it for every platform. Xamarin has their cross-platform C#. Google is pushing Java with its ability to share code between Android, iOS and the web. Dropbox uses C++ for shared logic. RemObjects has their cross-platform Swift. Not to mention frameworks like Flash and Cordova. I still cannot believe that the decision makers would rather have us maintain two separate codebases, but I guess you need to be good at engineering to comprehend the benefits.   

On a positive note, I am extremely pleased with the aesthetics of TT Mobile apps; graphical design and usability are essential. Nobody wants to use an app that looks “f-ugly” or that feels cumbersome. Folks at TT spent countless hours doing usability studies and polishing the design. Trust me – a lot of love went into making of these apps. They look awesome, they are snappy and I really hope you’ll enjoy them 🙂

TT Mobile available in Google Play

TT Mobile is now available for everyone to download from Google Play. It looks awesome! Great job, team! This version also added support for trading strategies written in TT SDK running on my AlgoSE server. Below is a screenshot showing child orders of SSE’s Time Sliced order. TT’s next generation Synthetic Strategy Engine (SSE) runs on top of TT SDK and AlgoSE server. SSE strategies are written by my good friend William Baker.

Download TT Mobile today! 🙂

 

TT Mobile

TT Mobile now in Google Play store

 

TT Mobile in Google Play

Today marks an important milestone. TT’s next-generation mobile trading app for Android has been deployed to Google Play Store. It’s still in pre-release and available only to beta testers, but we are getting closer every day. It’s very stable and usable. The overall look has deviated slightly from my original design, but I like it better this way. It’s a little bit more intuitive. Below are the main functions of the app so far.

  • Watchlist of instruments
  • Instrument-centric view of orders and positions
  • Trading from order ticket
  • Trading and order management from price ladder (MD Trader)
  • Order management screen
  • Fills and Positions
  • Forever Audit Trail

The users can input trades from order ticket and MD Trader, monitor orders, have a watchlist of instruments, inspect their positions and watch the forever audit trail. Not too shabby for a mobile app! Very full featured, especially when compared to what’s out there. The team did an outstanding job. Oh, and iOS app is coming along as well.

If you have a @tradingtechnologies email address, head over to the link below and download your copy for Android.
https://play.google.com/apps/testing/com.tradingtechnologies.ntm
(pssst – can’t access the page? Make sure you’re logged in only with your TT account. Try incognito mode)

For those of you who don’t yet have access, take a look at some screenshots below.

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).

trading_technologies

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 🙂

HID Card and Android phone

At my workplace we use HID ProxCard II cards to enter the building and to open individual doors. Everybody has a card with their picture printed on it. The problem is that I keep forgetting mine, plus I’ve had it for such a long time that the card started to disintegrate and it looks rather nasty.

HID card

I really wanted to just use my Android phone in lieu of the card, but it seems like HID cards are not compatible with NFC 🙁
This of course wasn’t going to stop me. Somehow I wanted to “fuse” the card with my phone. If my phone had a plastic case or cover, I could just slip the card inside of it. But I own an HTC Once and since it’s made out of aluminium and gorilla glass, I don’t really need (or want) a cover for it. I decided to use a sticker to attach the card instead. I ordered a custom-fit sticker from SkinIt with a cute picture of my boys on it. Now I could finally start my project 🙂

Costom skin for HTC One

 

First I cut off a small strip of plastic along every edge of the card, starting with the top. Then I removed the front layer with the printed picture. It was clear that there were two additional layers to the card. Finally, I carefully separated the two remaining layers, exposing a copper coil and something that looked like a microchip.

Removed sticker and cut sides

Coil

 

Next step was to affix the layer with coil to the back of my HTC One. I chose not to remove the coil from the plastic it was glued to, and instead to attach the whole thing to the back of the phone with scotch tape. Of course I rounded it off a little bit witch scissors, just to make it look better.

HTC One

Coil from HID card affixed to back of HTC One

The final step was to place the SkinIt sticker over the back of the phone. Sadly that didn’t go as smooth as I hoped. Since the coil and microchip are not perfectly flat, you can see a small bulge. It will take some time to get used to it, but ultimately it should not be a big deal. A small price to pay for the convinience.
Here is a photo of the finished product. Now I just need to remember to carry my phone around with me at all times at work 😀

2013-10-07 17.56.12

NFC Extravaganza

What’s cool about the new Android phones is that they support Near Field Communication (NFC) technology. This was actually one of the reasons I got my HTC One.

Payments

I can now use Google Wallet to pay with my phone, simply by tapping on NFC-enabled credit card terminal. Hopefully soon every point of sale will be accepting NFC payments, especially after Apple jumps on board and ships iPhones with NFC.

NFC payment

Tap to pay is pretty cool, but I was curious what else NFC can be used for. There is the obvious tap to share pictures, or contacts, but what else?

I did some googling and came across this website: http://www.tagstand.com/. TagStand not only sells physical NFC tags, but also provides neat Android apps for interacting with the tags. One can read and write data to NFC tags, and later use them as triggers to execute various actions. What does that mean? What can it be used for? Well, check this out.

NFC-enabled sticker

Car mode

Every time I get into my car I turn on navigation and Bluetooth, so that I can listen to music through car speakers. I also turn on the “car dock” app, so that the screen doesn’t lock while I’m driving. Of course when I leave the car I need to remember to turn all that stuff off. Pretty repetitive… NFC to the rescue!

I got myself several NFC stickers from TagStand and installed NFC Task Launcher app to my phone. I placed a circular, water-proof tag right next to the gear shifter. Now all I have to do is to tap the sticker once I get into the vehicle.

2013-10-07 15.51.27

The NFC Task Launcher app is programmed to execute these tasks when phone is near my “car mode” tag:

Car mode taskIt’s pretty awesome. I don’t need WiFi, since I’m on the road. But I want GPS, Bluetooth, car dock, loud volume. Just for fun I have the phone say “Car mode activated. Have fun but drive carefully.” The only thing to watch is space. The NFC tag I’m using has only 144 bytes 😉

I also use my car’s Bluetooth as a trigger – when the phone detects car is no longer connected, it will execute the following steps:

Out of car

I never need to worry about doing this manually again 😀 Next I need to consider buying an NFC-enabled cradle; then I think the project will be complete.

NFC cradle

Other possible uses

I can picture placing the tag at work for time-keeping reasons, or at the church entrance. First tap to activate the “church mode”, second tap to disable it (vibrate mode, Bluetooth off, GPS off, WiFi off, Bible app on). Although for these you could use a “geo-fence”, but constantly checking location brains the battery.

I promise to write more once I come up with any more clever uses for the NFC awesomeness.

 

Edit: I was hoping to use my phone’s NFC as smart HID card at work, but the frequencies do not match. Came up with an alternate solution.

Update: I found a good website (http://www.buynfctags.com) which offers cheap NFC stickers, as well as high quality custom made NFC business cards. Definitely a must for high tech companies 😉

Android code generation

I started looking more seriously into Android development, especially after a great training session with Mark Murphy organized by Chicago Android. Right now I am experimenting with simple user interfaces (buttons, lists, etc) and learning how to utilize various phone’s sensors.

What’s caught my attention is the way Android’s build tools generate code. The layout for activities, templates, styles and controls is defined in XML files. These are then parsed at build time to extract the IDs, which then become available off the generated “R” class. The layout is “inflated” at runtime given a numeric ID. That’s also how one can get a reference to UI elements.

The use of XML files for UI layout is not unique to Android. In the past I used Glade, Mozilla’s XUL and Microsoft’s XAML. Lately especially I’ve been playing XAML. It was a surprise to me that pretty much every single Java sample contains code like this:

Seems very repetitive and a lot of silly code to write. Tooling for other frameworks take slightly different approaches. In XAML there is a special namespace used by the XAML parser that allows the user to specify a name for the class member referencing the layout element. For example:

results in creation of member variable “ClearButton” in the class “MyCoolWindow” of “MySample” namespace. No need for getting view elements by id and for casting. I’m wondering why can’t something like this be done for Android?

I obviously am not even pretending to know anything Android, so I am asking you the experts =)
Is there any technical reason against it?

C# has a concept of partial classes (one class spanning multiple source files), so it’s easy to just stick the generated code into its own file. Java’s philosophy is different: why span multiple files? Just create multiple classes. Seems like it shouldn’t be that difficult.

One could come up with an XML schema for specifying the name (like in XAML). XML allows decorating elements with multiple attributes, so it would work. Or, alternatively, the name specified in android:id could be used, but I think it needs to be unique for all IDs. Specifying a name per class could be more desirable.
Please see a mockup file below:

A custom pre-processor tool could be written that would parse the XML files and create a new class for each of them – say “LayoutXyzHelper”. These helpers would perform all the findViewById() during construction and expose all desired controls as member variables. A generated helper class for the XML layout above could look like this:

The usage would be to construct the layout helper and save it as a “ui” member variable.

Well, what do you think? Does this sound like a good open-source project idea? Or am I missing something obvious due to my lack of Android experience? Maybe this has already been done?
Either case, please let me know.

Mobile project, cont.

Something I just thought of for my new mobile project:

I also want to reuse as much code as I can between the WP7 and Android solutions. The code sharing part is what in my opinion will be most complicated. It seems like the two “camps” couldn’t be further apart, and that there are no common tools available. It would be great if there was something like MonoTouch but for Android (MonoDroid, are you here yet?) so that I can code in C#…

Hopefully, with Brad Abrams working for Google, we will see a more .NET friendly Android. Time will tell. In the meantime, I need to figure something out.