Ninja Trader Custom Order Book - 1LDom - Source Code
Some time ago I did some work on Gomi's original volume ladder. I had the idea of converting it into a usable order book that would allow one to both customise the refresh rate as well as view the book in a format that many people like to view it i.e. LARGE FONT, volume ladder, cumulative volume trades, full depth of book etc.
Basically a similar set up as TT's X-Trader - or at least the same look and feel.
Back when I wrote the tool I used Gomi's original framework as a base and then added in the code to allow for the functioning of an order book.
Since then I have moved the tool on a fair bit and I would say it is relatively stable. I released the tool on my blog a couple of months ago and I had a huge stream in from BigMike with folks downloading it.
Two things I wanted to mention, firstly the source code does not appear on my blog because I feel the original base framework was Gomi's IP and it's not my place to post it there. However, I would like the code to be available to the community in hope that a few other keen developers will pick it up and it may take on a life of it's own, without just me to support it.
So with that in mind I'm creating this thread here on BigMike with the attached source code for the tool. If anyone wants to just download the binaries or read the "How-To" or install instructions, they are on my blog in the Ninja Trader portion of the menu.
Of the many that downloaded I have had few comebacks. Of those that have, most have been sortable and I've added a Treasuries pricing option to it. There are however a couple of guys that are still struggling with a crash which I have been unable to replicate to date so I'm hoping that through a larger take up and possibly with some guys that also have some development skills out there, someone may be able to replicate the crash and point us to it.
Any case, here is the attached source code. Enjoy it and please if you do some work then share it with the community or send it to me and I will incorporate it.
Thanks go out to Gomi for the original code framework.
If anyone is having the blue chart crash I mentioned above and is willing to commit a half hour to getting to the bottom of it, I would be happy to come onto said persons machine and debug it to track down the issue.
In order for me to be able to do so you would need to have a working copy of Visual Studio C# installed on your machine along side Ninja and we would need to make use of some sort of screen sharing app like Team Viewer which I believe is free.
It is an open invitation to get the issue sorted so just get in touch.
I am getting the beloved "Index was outside the bounds of the array" error.
Error on calculating indicator min/max value for indicator 'OneLDOM'. Please check the 'GetMinMaxValues' method
This happened on a CL 1m chart with stock settings.
May I ask why you chose to do it all in the chart window as opposed to creating a new form? It might (or might not) be a bit simpler in the end, I'm not entirely sure...and you could move it around (I am sure about that though).
You mentioned when you run it on a 1minute chart, did you not mean a 1 Tick chart? If you meant 1minute, can you confirm whether the same problem still exists at tick increment.
The reason for the chart space is that I originally created it using Gomi's existing volume ladder framework which had all the necessary draw functions etc. and meant I could put it together fairly swiftly. I also at the time envisioned a book that had the foot print coming out of the bid/ask spread and could be used for footprint style analysis.
Over time as I learnt more about the book, I realised that while a nice idea it is not practical for trading. The book moves to fast and it is in the "to much information" category. Such bells and whistles actually lead to more of a distraction from what is really important which is the cumulative volume running through at the levels as opposed to cumulative splits by random time elements and delta figures which are not stable across all the different feed providers.
In the end it was a tool i built for myself to use and so it's development followed a path of what I found useful. Probably why there is still some bugs now that it is being tested outside of my own use case.
Regards bug fixing my suggestion with some of the bugs is this, those that want the bug that is hampering there setup fixed need to allow me to come in and debug it. To do so, I would need you to have Visual Studio on your machine. Which can be downloaded here:
I haven't tried this yet so maybe it changes but try this first.
I would prefer that we arrange a time, you install these two things, we link up and I debug and then I will fix the base source. The reason I suggest this approach is that I have already had a couple of requests regards bugs that I have spent many many hours just trying to replicate and have not been able to do so which means that in each case they are implementation specific. So I'm hoping another developer will pick this up and have a similar situation and can point us to the crashes. Or we take my quick kill line of approach with a remote session and a debugger.
As it stands I believe we have two critical reported bugs at the moment that need sorting:
1) Random Blue Screen on some installations.
2) Out of Bounds index array on stock set up.
The following user says Thank You to 1LotTrader for this post:
It wasn't clear to me that I need a 1tick chart, also, is the chart template mandatory or not? I was on a 1m chart, changed that to 1tick, that might have solved it. Can't tell for sure, as I'm getting an other error now: Error on plotting indicator 'OneLDOM'. Please check the 'OnBarUpdate' or the 'Plot' method: (rough translation) the entry string has the wrong format. I think this might be an issue where the convention of where to use(.) or (,) is surfacing.
Guys this cs file compiles straight into the DOM indicator. The chart template is unnecessary but it will provide the base settings that give the DOM the look and feel as it appears in the video. If you just apply the indicator you need to set those up how you want it.
There are in fact a host of other settings that can be changed that will change the appearance/functionality etc. but I didn't want to get into that line as it may lead to a raft of different issues that are merely settings that may or may not be put in correctly. With the template I at least know what base settings the DOM is running on in order to try and identify critical bugs for users that are just making use of the basic functionality.
vvhg: that is the same blue chart error that I have been trying to figure out for a number of weeks, at least that is how it is reported in the log to those that experience the issue. The chart essentially just turns blue as it crashes the indicator and what is left is the blue background.
The following 3 users say Thank You to 1LotTrader for this post: