Profile Picture

Source code for TWS Plugin

Posted By dplaisted 8 Years Ago
Message
Posted Tuesday June 16 2009
EDIT: The latest version of the source code to the TWS plugin can now be found at http://github.com/dsplaisted/RightEdgePlugins. See this post for details. I have removed the outdated code that was attached to this post.

We've decided to release the source code to the TWS broker/data plugin. This will serve as a real-world example of a broker and data provider plugin, as well as allowing people to modify the plugin as needed.

The plugin includes a modified version of the Interactive Brokers C# API available from http://www.dinosaurtech.com/utilities/.

The plugin references RightEdge's Common.dll. I've included the DLL from RE2008E2 beta 11 in the zip, you may want to update the reference to point at the version in your RightEdge installation directory so it will work with subsequent releases.
Posted Friday June 26 2009
I built this code with VC# Express and copied the TWSCSharpPlugin.dll and Krs.Ats.IBNet.dll in the RE plugins folder. (RE Ed1 Build 384). I restarted RE and on opening the IB service in Service Setup I just got "Error loading service. Interactive Brokers Plugin"

I tried both the Release and Debug dlls...

Have I missed something?

PS - I only want to add some logging around execution handling to understand what is happening with my FA Account / Negative fills problem. I suspect I am getting fills for all accounts and I need to filter only executions for the master account...

thanks for your help.


Edited: Friday June 26 2009 by smersh
Posted Friday June 26 2009
This source code is for RE2008 Edition 2. So it is referring to the Edition 2 Common.dll and won't load under edition 1.

You should be able to change the reference in the project to the Common.dll for Edition 1. You may have to make a few changes to the code after that, but then you should be able to compile it and use it in Edition 1.

Thanks,
Daniel
Posted Tuesday June 30 2009
Should I uncomment #define RE1_1 to make a version for ED1?
Posted Tuesday June 30 2009
You could, but ideally you'd just define RE1_1 in Visual Studio on the project properties.

smersh (6/30/2009)
Should I uncomment #define RE1_1 to make a version for ED1?
Posted Thursday July 02 2009
Actually, "RE1_1" refers to RightEdge 1.1, which was the version prior to RightEdge 2008 Edition 1. Defining that compiler constant won't help build the code for 2008E1. You will have to make the changes yourself, but I believe they should be minor.


Similar Topics


Reading This Topic


2005-2017 © RightEdge Systems