We are happy to announce that we are planning to make the source code for all of our service plugins available. This will provide real-world examples of how to write broker and data provider plugins, as well as allowing users to modify the code for themselves as necessary.
Currently, we have released the source to the data storage plugins, and the Interactive Brokers TWS, IQFeed, and Open E Cry plugins. The source code is included in the RightEdge installation under the RightEdgePlugins folder in the RightEdge samples. There is a shortcut to the RightEdge samples in the RightEdge program group in the start menu.
How to modify a plugin, build it, and use it in RightEdge
- Create a copy of the RightEdgePlugins folder. This is so that when you install a new build of RightEdge it won't overwrite the changes you made, and so you will still have the original source code available to refer to.
- From the copied folder you created, open the RightEdgePlugins solution in Visual Studio.
- Build the solution. If there are errors, it is likely because Common.dll and/or RightEdge.Shared.dll aren't being found. Add the correct references in Visual studio, or copy these files from the RightEdge installation directory to the folder for the projects that are failing to build.
- Modify the assembly name for the plugin you want to modify. This will change the filename of the DLL that is produced so you can have the original version and your customized version both in the RightEdge plugins directory. To change the assembly name, right click on the project node in the solution explorer and go to the project properties.
- Modify the service name or plugin display name. This will let you distinguish your plugin from the default version of the plugin when selecting which plugin to use in RightEdge. For IService plugins, change the return value for the ServiceName() method. For data storage and optimization plugins, change the value in the DisplayName attribute before the plugin class (in the BinaryDataStore.cs file for the Local Data Store). You can also change the Description attribute to include more information about your plugin.
- If there are other plugins in the same project that you don't want to modify, remove those source files from the project. For example, the DataStorage project has the binary data store plugin, SQL Server plugin, and a Jet data storage plugin. If you just want to customize the binary data store, you should remove the other two plugins from the project so you don't have duplicate versions of them showing up in RightEdge.
- Make the changes you want to the plugin code to customize its behavior.
- Build your modified plugin, and copy the output DLL to the Plugins folder under the RightEdge installation directory. When you build the project, the DLL will be created under bin\Debug\Plugins or bin\Release\Plugins.
- Start RightEdge, and start using the plugin. For service plugins, you will need to create a new service corresponding to your modified plugin, and then set one or more watchlist folders to use the new service. For data storage plugins, you will need to choose the new plugin in the RightEdge options.
Let us know if you run into any problems.
The source code is also available at github, an online source control service. Most people won't need to worry about github, but occasionally we will update the source code there before we can release a new build of RightEdge, and if you make changes to one of the plugins that you would like us to consider incorporating back into the official versions, github has features that help with this. The project webpage is http://github.com/dsplaisted/RightEdgePlugins. PLEASE NOTE: The github projects are no longer generally kept up to date, since it's much easier for most people to use the source code that is installed with RightEdge, and because updating the github projects is a manual process while updating the code installed with RightEdge happens automatically. If you want to use the githab versions feel free to ask us to update them with the latest source.