Ninja Trader Custom Order Book - 1LDom - Source Code - NinjaTrader Programming | futures io social day trading
futures io futures trading


Ninja Trader Custom Order Book - 1LDom - Source Code
Updated: Views / Replies:72,169 / 356
Created: by 1LotTrader Attachments:83

Welcome to futures io.

(If you already have an account, login at the top of the page)

futures io is the largest futures trading community on the planet, with over 90,000 members. At futures io, our goal has always been and always will be to create a friendly, positive, forward-thinking community where members can openly share and discuss everything the world of trading has to offer. The community is one of the friendliest you will find on any subject, with members going out of their way to help others. Some of the primary differences between futures io and other trading sites revolve around the standards of our community. Those standards include a code of conduct for our members, as well as extremely high standards that govern which partners we do business with, and which products or services we recommend to our members.

At futures io, our focus is on quality education. No hype, gimmicks, or secret sauce. The truth is: trading is hard. To succeed, you need to surround yourself with the right support system, educational content, and trading mentors Ė all of which you can find on futures io, utilizing our social trading environment.

With futures io, you can find honest trading reviews on brokers, trading rooms, indicator packages, trading strategies, and much more. Our trading review process is highly moderated to ensure that only genuine users are allowed, so you donít need to worry about fake reviews.

We are fundamentally different than most other trading sites:
  • We are here to help. Just let us know what you need.
  • We work extremely hard to keep things positive in our community.
  • We do not tolerate rude behavior, trolling, or vendors advertising in posts.
  • We firmly believe in and encourage sharing. The holy grail is within you, we can help you find it.
  • We expect our members to participate and become a part of the community. Help yourself by helping others.

You'll need to register in order to view the content of the threads and start contributing to our community.  It's free and simple.

-- Big Mike, Site Administrator

Reply
 83  
 
Thread Tools Search this Thread
 

Ninja Trader Custom Order Book - 1LDom - Source Code

  #91 (permalink)
 Vendor: the1lottrader.com 
Douglas, United Kingdom
 
Futures Experience: Advanced
Platform: Custom
Favorite Futures: Bund
 
1LotTrader's Avatar
 
Posts: 181 since Jun 2009
Thanks: 206 given, 445 received

David, if you want to remove the features that make this DOM what it is, then I don't understand why you don't just use the Ninja SuperDom.. without the ladders and the increased legibility, that is effectively what you will be looking at.

Reply With Quote
The following user says Thank You to 1LotTrader for this post:
 
  #92 (permalink)
 Vendor: the1lottrader.com 
Douglas, United Kingdom
 
Futures Experience: Advanced
Platform: Custom
Favorite Futures: Bund
 
1LotTrader's Avatar
 
Posts: 181 since Jun 2009
Thanks: 206 given, 445 received


Zondor View Post
The code in the OnMarketDepth method of the attached indicator seems to work OK with TT so maybe there are some clues here about how the order book can be populated without phantom rows.

Just had a look and they are trapping the Operation.Remove event as normal so it would appear it comes through ok for TT since you say it works ok with that indicator, the IB code block may be a red herring (IB operate differently as they snapshot their ticks), which may be the cause of the non-event for the remove operation in that instance. Could be that the TT phantoms are a result of something else.

Any case, I just got a TT demo a few minutes ago. So will debug it and see what is going on.

Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:
 
  #93 (permalink)
 Vendor: the1lottrader.com 
Douglas, United Kingdom
 
Futures Experience: Advanced
Platform: Custom
Favorite Futures: Bund
 
1LotTrader's Avatar
 
Posts: 181 since Jun 2009
Thanks: 206 given, 445 received


Zondor,

I've changed the code to work on absolute positions as well as the price positions.

Should be fine now. I will continue to run it for a day to test it. Can you download compile and stick it on yours. Two sets of eyes are better than one. Looks good to me though now.

Remember, IB option should be switched off. This feed should now function as the others without that option being necessary.

See attached for latest .cs

1Lot

Attached Files
Register to download File Type: cs OneLDOM.cs (90.4 KB, 60 views)

Last edited by 1LotTrader; October 17th, 2012 at 12:04 PM.
Reply With Quote
The following user says Thank You to 1LotTrader for this post:
 
  #94 (permalink)
 Vendor: the1lottrader.com 
Douglas, United Kingdom
 
Futures Experience: Advanced
Platform: Custom
Favorite Futures: Bund
 
1LotTrader's Avatar
 
Posts: 181 since Jun 2009
Thanks: 206 given, 445 received

Ok guys, have run this through the evening and rechecked the other existing feeds. Seems good to me.

I built a 1.7 binary, the source for which is attached to previous post. I don't think anyone was using the TT feed other than @Zondor but if you were then the latest version will fix the issue there.

If your not using that particular feed then it's not necessary to load the new version as the rest is unchanged.

Cheers
1Lot

Reply With Quote
The following user says Thank You to 1LotTrader for this post:
 
  #95 (permalink)
Market Wizard
New Orleans, La (Mardi Gras City)
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: Ninjatrader / Optimus Futures / AmpFutures
Favorite Futures: ES / 6E / 6B / CL
 
DavidHP's Avatar
 
Posts: 1,002 since Aug 2009
Thanks: 803 given, 1,367 received


1LotTrader View Post
David, if you want to remove the features that make this DOM what it is, then I don't understand why you don't just use the Ninja SuperDom.. without the ladders and the increased legibility, that is effectively what you will be looking at.

I do not want to change the way it functions.
There is just some 'padding' in the columns that could be reduced and make the DOM tighter.

Also, the indicator allows the columns to be 'shown or not'.
When not shown, the space the column occupies remains constant.
I thought maybe that was not the intention.
I use it with all of the functions active so this was not an issue but only a comment.

I'm sorry I seemed to not be grateful for your work.
I like it and will modify it for my needs.

Thanks for sharing with futures.io (formerly BMT).

Rejoice in the Thunderstorms of Life . . .
Knowing it's not about Clouds or Wind. . .
But Learning to Dance in the Rain ! ! !
Reply With Quote
The following user says Thank You to DavidHP for this post:
 
  #96 (permalink)
 Vendor: the1lottrader.com 
Douglas, United Kingdom
 
Futures Experience: Advanced
Platform: Custom
Favorite Futures: Bund
 
1LotTrader's Avatar
 
Posts: 181 since Jun 2009
Thanks: 206 given, 445 received


DavidHP View Post
I do not want to change the way it functions.
There is just some 'padding' in the columns that could be reduced and make the DOM tighter.

Also, the indicator allows the columns to be 'shown or not'.
When not shown, the space the column occupies remains constant.
I thought maybe that was not the intention.
I use it with all of the functions active so this was not an issue but only a comment.

I'm sorry I seemed to not be grateful for your work.
I like it and will modify it for my needs.

Thanks for sharing with futures.io (formerly BMT).

ok mate,

Many of the parameters are a throw back to the original framework and a majority are no longer relevant. I mentioned that in my How-To in setting it up but it's in a separate area on my blog so you may have missed it.

At some point in the future when I have a bunch of spare time kicking around I will clean that stuff up so only the relevant bits are showing.

In the mean time I have added some options for you to adjust default cell widths heights and fonts etc. See image for the settings I punched in, they are integers and will accept negatives, more negative = narrower, larger = wider. I put all the new params in a new formatting section with some stuff from the old colours section. I guess with various people having different screen sizes it may be necessary to make slight adjustments. using those options you should be able to get it as small as you want however.

One thing I will say at this point, I seriously would discourage folk from trading on laptops, ipads, iphones and the rest of it, if you trade as a hobby then fine but it is not the realms of a professional trader. Minimum requirements in my view are 1x desk, 1x quiet office, 1x decent size monitor.. that should be a given.

Shrinking the DOM down to such a small size in my opinion impacts the feel for the numbers. Rather than studying it you will push it off to the side and it will become this little box full of fast ticking numbers that you glance at once in a while which was not the intention. I know I bang on quite a bit about TT but it is a good benchmark because really they specialise in the DOM. It is a platform that has been used by professionals for many years and while it may look ugly or old or whatever, there is a great deal of thought behind it's construction and aesthetics. Mostly it is based on practicality and functionality that can only be appreciated after many hours of use.

Any case, let me know if those options all work out alright, i did a quick test and seems good. I've attached the .cs source file and it will be in the next binary when I build one.

Cheers
1Lot

Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).

Attached Files
Register to download File Type: cs OneLDOM.cs (93.1 KB, 50 views)
Reply With Quote
The following 4 users say Thank You to 1LotTrader for this post:
 
  #97 (permalink)
Elite Member
Aarhus, Denmark
 
Futures Experience: Intermediate
Platform: Ninja
Broker/Data: Dorman - Continuum - Kinetick
Favorite Futures: NQ, ES
 
Posts: 18 since Apr 2012
Thanks: 45 given, 20 received

Unhandled Exception flod my trace file.

1Lot - first of all, thanks for a great tool. For the first time I think there might be a chance that I actually will understand this DOM feature.

BUT when I run the OneLDOM (also the one you just posted minutes ago) it throws a lot of exceptions, flooding my trace file (yesterday it reached 475 MB due to exceptions).

They looks like this:

2012-10-18 15:42:08:557 in OnUnhandledThreadException
2012-10-18 15:42:08:573 *************** unhandled exception trapped ***************
2012-10-18 15:42:08:573 Object reference not set to an instance of an object.
2012-10-18 15:42:08:573 at NinjaTrader.Indicator.OneLDOM.timer_Tick(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
2012-10-18 15:42:08:619 in OnUnhandledThreadException
2012-10-18 15:42:08:619 *************** unhandled exception trapped ***************
2012-10-18 15:42:08:619 Object reference not set to an instance of an object.
2012-10-18 15:42:08:619 at NinjaTrader.Indicator.OneLDOM.timer_Tick(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
2012-10-18 15:42:08:729 in OnUnhandledThreadException
2012-10-18 15:42:08:729 *************** unhandled exception trapped ***************
2012-10-18 15:42:08:729 Object reference not set to an instance of an object.
2012-10-18 15:42:08:729 at NinjaTrader.Indicator.OneLDOM.timer_Tick(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Timer.OnTick(EventArgs e)
at System.Windows.Forms.Timer.TimerNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

...and this goes on and on and on... Any idea? What am I looking for?

Reply With Quote
The following 2 users say Thank You to calojn for this post:
 
  #98 (permalink)
 Vendor: the1lottrader.com 
Douglas, United Kingdom
 
Futures Experience: Advanced
Platform: Custom
Favorite Futures: Bund
 
1LotTrader's Avatar
 
Posts: 181 since Jun 2009
Thanks: 206 given, 445 received

Is the DOM actually running ok on the screen and just throwing exceptions in the background?

If it is running ok but throwing background exceptions then try switching off the Debug Info option in the compiler and then recompiling it for now, I think that will stop the trace.

I will look through it in the mean time and see why that's happening.

1Lot

* EDIT * ok yes I see it, will fix it and upload a new .cs when it's done.

Reply With Quote
The following user says Thank You to 1LotTrader for this post:
 
  #99 (permalink)
Elite Member
Aarhus, Denmark
 
Futures Experience: Intermediate
Platform: Ninja
Broker/Data: Dorman - Continuum - Kinetick
Favorite Futures: NQ, ES
 
Posts: 18 since Apr 2012
Thanks: 45 given, 20 received


1LotTrader View Post
Is the DOM actually running ok on the screen and just throwing exceptions in the background?

If it is running ok but throwing background exceptions then try switching off the Debug Info option in the compiler and then recompiling it for now, I think that will stop the trace.

I will look through it in the mean time and see why that's happening.

1Lot

* EDIT * ok yes I see it, will fix it and upload a new .cs when it's done.

Great - thanks.

And it is not compiled in Debug mode.

Reply With Quote
The following user says Thank You to calojn for this post:
 
  #100 (permalink)
 Vendor: the1lottrader.com 
Douglas, United Kingdom
 
Futures Experience: Advanced
Platform: Custom
Favorite Futures: Bund
 
1LotTrader's Avatar
 
Posts: 181 since Jun 2009
Thanks: 206 given, 445 received


ok mate there you go.

Log should be perfectly clear now and performance should be a fair bit better, I didn't spot that going on but all those text file writes could not have been helping things. You may need to readjust your performance tuning parameters after this version. Potentially it will allow for faster refreshing on slower machines without any lock up.

I will run this one for 24 hours and check for introduced snags before building a new binary but pretty sure it's good.

The feedback is appreciated.

Thanks
1Lot

Attached Files
Register to download File Type: cs OneLDOM.cs (91.3 KB, 56 views)
Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:

Reply



futures io > > > > > Ninja Trader Custom Order Book - 1LDom - Source Code

Thread Tools Search this Thread
Search this Thread:

Advanced Search



Upcoming Webinars and Events (4:30PM ET unless noted)

Jigsaw Trading: TBA

Elite only

FuturesTrader71: TBA

Elite only

NinjaTrader: TBA

Jan 18

RandBots: TBA

Jan 23

GFF Brokers & CME Group: Futures & Bitcoin

Elite only

Adam Grimes: TBA

Elite only

Ran Aroussi: TBA

Elite only
     

Similar Threads
Thread Thread Starter Forum Replies Last Post
The order book - why bother? DionysusToast Traders Hideout 9 September 3rd, 2013 08:27 AM
Looking for Ninja Trader order book indicator. jerdog NinjaTrader 2 November 29th, 2011 05:43 AM
Zenfire C# API with source code tinkerz Reviews of Brokers and Data Feeds 3 July 24th, 2011 02:35 AM
How to set up a Stop (Limit) Loss order - Ninja Trader jdumanic NinjaTrader 2 June 7th, 2011 06:40 PM
New Version Ninja Trader 7 / code breaking change Mauro_60 The Elite Circle 6 September 15th, 2010 09:13 AM


All times are GMT -4. The time now is 06:59 PM.

Copyright © 2017 by futures io, s.a., Av Ricardo J. Alfaro, Century Tower, Panama, +507 833-9432, info@futures.io
All information is for educational use only and is not investment advice.
There is a substantial risk of loss in trading commodity futures, stocks, options and foreign exchange products. Past performance is not indicative of future results.
no new posts
Page generated 2017-12-16 in 0.15 seconds with 20 queries on phoenix via your IP 54.145.16.43