NexusFi: Find Your Edge


Home Menu

 





Ninja Trader Custom Order Book - 1LDom - Source Code


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one 1LotTrader with 120 posts (318 thanks)
    2. looks_two Silvester17 with 27 posts (74 thanks)
    3. looks_3 Zondor with 17 posts (28 thanks)
    4. looks_4 philipp with 14 posts (7 thanks)
      Best Posters
    1. looks_one aligator with 3 thanks per post
    2. looks_two 1LotTrader with 2.7 thanks per post
    3. looks_3 Silvester17 with 2.7 thanks per post
    4. looks_4 Zondor with 1.6 thanks per post
    1. trending_up 175,626 views
    2. thumb_up 598 thanks given
    3. group 70 followers
    1. forum 356 posts
    2. attach_file 80 attachments




 
Search this Thread

Ninja Trader Custom Order Book - 1LDom - Source Code

  #91 (permalink)
 
1LotTrader's Avatar
 1LotTrader 
Douglas, United Kingdom
 
Experience: Advanced
Platform: Custom
Trading: Bund
Posts: 181 since Jun 2009
Thanks Given: 206
Thanks Received: 445

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.

Follow me on Twitter Started this thread Reply With Quote
Thanked by:

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Better Renko Gaps
The Elite Circle
REcommedations for programming help
Sierra Chart
MC PL editor upgrade
MultiCharts
NT7 Indicator Script Troubleshooting - Camarilla Pivots
NinjaTrader
 
Best Threads (Most Thanked)
in the last 7 days on NexusFi
Spoo-nalysis ES e-mini futures S&P 500
29 thanks
Just another trading journal: PA, Wyckoff & Trends
26 thanks
Tao te Trade: way of the WLD
24 thanks
Bigger Wins or Fewer Losses?
23 thanks
GFIs1 1 DAX trade per day journal
18 thanks
  #92 (permalink)
 
1LotTrader's Avatar
 1LotTrader 
Douglas, United Kingdom
 
Experience: Advanced
Platform: Custom
Trading: Bund
Posts: 181 since Jun 2009
Thanks Given: 206
Thanks Received: 445


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.

Follow me on Twitter Started this thread Reply With Quote
Thanked by:
  #93 (permalink)
 
1LotTrader's Avatar
 1LotTrader 
Douglas, United Kingdom
 
Experience: Advanced
Platform: Custom
Trading: Bund
Posts: 181 since Jun 2009
Thanks Given: 206
Thanks Received: 445


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
Elite Membership required to download: OneLDOM.cs
Follow me on Twitter Started this thread Reply With Quote
Thanked by:
  #94 (permalink)
 
1LotTrader's Avatar
 1LotTrader 
Douglas, United Kingdom
 
Experience: Advanced
Platform: Custom
Trading: Bund
Posts: 181 since Jun 2009
Thanks Given: 206
Thanks Received: 445

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

Follow me on Twitter Started this thread Reply With Quote
Thanked by:
  #95 (permalink)
 
DavidHP's Avatar
 DavidHP 
Isla Mujeres, MX
Legendary Market Wizard
 
Experience: Advanced
Platform: NinjaTrader
Broker: Ninjatrader / Optimus Futures / AmpFutures
Trading: ES / 6E / 6B / CL
Frequency: Every few days
Duration: Minutes
Posts: 1,611 since Aug 2009
Thanks Given: 11,341
Thanks Received: 2,744


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 ! ! !
Follow me on Twitter Reply With Quote
Thanked by:
  #96 (permalink)
 
1LotTrader's Avatar
 1LotTrader 
Douglas, United Kingdom
 
Experience: Advanced
Platform: Custom
Trading: Bund
Posts: 181 since Jun 2009
Thanks Given: 206
Thanks Received: 445


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 nexusfi.com (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


Attached Files
Elite Membership required to download: OneLDOM.cs
Follow me on Twitter Started this thread Reply With Quote
  #97 (permalink)
 calojn 
Aarhus, Denmark
 
Experience: Intermediate
Platform: Ninja
Broker: Dorman - Continuum - Kinetick
Trading: NQ, ES
Posts: 18 since Apr 2012
Thanks Given: 45
Thanks Received: 20

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
  #98 (permalink)
 
1LotTrader's Avatar
 1LotTrader 
Douglas, United Kingdom
 
Experience: Advanced
Platform: Custom
Trading: Bund
Posts: 181 since Jun 2009
Thanks Given: 206
Thanks Received: 445

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.

Follow me on Twitter Started this thread Reply With Quote
Thanked by:
  #99 (permalink)
 calojn 
Aarhus, Denmark
 
Experience: Intermediate
Platform: Ninja
Broker: Dorman - Continuum - Kinetick
Trading: NQ, ES
Posts: 18 since Apr 2012
Thanks Given: 45
Thanks Received: 20


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
Thanked by:
  #100 (permalink)
 
1LotTrader's Avatar
 1LotTrader 
Douglas, United Kingdom
 
Experience: Advanced
Platform: Custom
Trading: Bund
Posts: 181 since Jun 2009
Thanks Given: 206
Thanks Received: 445


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
Elite Membership required to download: OneLDOM.cs
Follow me on Twitter Started this thread Reply With Quote
Thanked by:




Last Updated on February 19, 2014


© 2024 NexusFi™, s.a., All Rights Reserved.
Av Ricardo J. Alfaro, Century Tower, Panama City, Panama, Ph: +507 833-9432 (Panama and Intl), +1 888-312-3001 (USA and Canada)
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.
About Us - Contact Us - Site Rules, Acceptable Use, and Terms and Conditions - Privacy Policy - Downloads - Top
no new posts