Page 1 of 1

Opensource trading with MBTrading and TradeLink

Posted: Tue May 04, 2010 1:33 am
by michaelangela
Hey all,

I'm not sure where the best place would be to put this so it's here. This is a request for help from folks who use MB Trading and are doing development of automated strategies.

The short version:

I have been working with TradeLink's author to get MBT support working. Some kind soul named Alan helped get some initial groundwork done and the code I have added is built on that. I am not a C# developer but I have picked it up. So if you'd like to help flesh out MBT support for TradeLink go here:

http://tradelink.googlecode.com/

I don't work for them. But I my interest is in getting a stable trading platform up and running. I'll try to answer questions specific to MBT if I can on their forums.

The long version:
started with MBTrading in 2007?
started trying to do automated trading with MBT SDK around that time with Python. (I'm a web developer.) Python and COM are not the best of friends.

Switched to NinjaTrader. Wanted to subscribe but it couldn't keep from dropping the connection overnight and (at least at that version) that version was not recommended for actual unattended trading. I knew what I wanted to do but I couldn't do it because it's proprietary and they wouldn't be making the updates needed until... not sure when.

Looked at some other options (including ThinkingStuff which was almost going to support MBT) and eventually settled on TickZoom which at first was priced comparably with NinjaTrader. I thought I could swing that. The business model changed, understandably, and it went out of my reach.

A huge chunk of time later (mostly spent trying to get a viable development platform working without breaking the bank). No good.

Until the TradeLink author put together a basic server for MBT and as noted above "Alan" stepped in and helped bring it up to speed.

I had heard of TradeLink before because of the TickZoom <-> TradeLink connection (another story there) but it didn't support MBT. Then recently it did. I was happy. Except it needed more work. I pitched in and my most recent patch can be found in the Files section on the site.

So. At this point I am now able to write strategies (called Responses) and have them submit orders. There are a lot of pieces to it though so I can't go over it all here. But I thought I'd bring it up. I've been looking for something like this for a long time. If you're interested you can see all of my questions in the forums over there at TradeLink.

I have been learning from some of the threads here by TRO and MO and others am looking to automate some of those. Could be interesting. :) Any takers?

Posted: Tue May 04, 2010 5:54 pm
by dudehead
This is a pretty good writeup, but I have some question marks in my mind.

My understanding is that the MBT SDK allowed you to write custom .dll's that could proxy
through an open MBT platform on your system. Is this not the case?

Why would you need a third party server like TradeLink to send transactions to MBT?
Whenever a third party is involved, there is greater risk of problems/bugs/squirelliness.

I am interested in contributing to a project that will DIRECTLY talk to the MBT servers from
my computer.

I am interested in:
1. Entering in sophisticated orders, similar to the OTO/OCO and such, but using more extensive presets, like scaling in/out at Profit/loss levels.
2. Writing mechanical bots to trade basic setups.

I am a C/C++/Java kernel developer with 20+ years Windows+*nix experience.

Posted: Wed May 05, 2010 12:27 am
by michaelangela
You have far more experience than I do! The TradeLink author can answer your question in more detail than I can but yes this project does directly talk to MBT's servers. The component that does that is, in this bit of code, the ServerMB project. The breakdown is like this:

A client app that manages your strategies (I currently use ASP) and connects to your broker
Your strategies (ASP uses "responses" compiled as a dll)
Your broker connector which also runs on your computer (ServerMB for MBTrading)

Everything runs on your own computer. You can also write your own client app so you don't need to use the ones provided in the TradeLink suite.

The suite provides a lot of things to help so you don't have to write everything from scratch which is the reason I am using it. Of course no software is perfect but the entire suite is open source so if there are issues they can be fixed. The author is pretty quick to respond to issues that are brought up.

It can definitely handle the stuff you're talking about. Here is some info on the specifics:

http://code.google.com/p/tradelink/wiki/ResponseDocs
http://code.google.com/p/tradelink/wiki ... Components

I'd recommend joining the list and asking questions there.