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,118 / 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

  #11 (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


vvhg View Post
I narrowed the error down to this loop(line 2143):
 
Code
foreach (KeyValuePair<string,GLadderClass> ladderIterator in gLadders)
				{....
I had a look with Print() statements, the last ones i got were from inside this loop (three loop runs before the crash to be precise).

Tell me if you need more...

vvhg

yes there are two parts of code that refers to, one is the redraw mapping area and the other is the construction of the ladder itself, maybe you can do me one favour. I have a suspicion it is still the price constant ladder.

Can you switch if off in the parameters and see what is the effect.

Go to the indicator parameters and look for "Price Constant" and set the Show option to "FALSE" instead of true and then try to refresh or reload and see does it still give the same problem?

1Lot

Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:
 
  #12 (permalink)
Elite Member
Northern Germany
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: FDAX, CL
 
vvhg's Avatar
 
Posts: 1,583 since Mar 2011
Thanks: 1,016 given, 2,807 received


1LotTrader View Post
yes there are two parts of code that refers to, one is the redraw mapping area and the other is the construction of the ladder itself, maybe you can do me one favour. I have a suspicion it is still the price constant ladder.

Can you switch if off in the parameters and see what is the effect.

Go to the indicator parameters and look for "Price Constant" and set the Show option to "FALSE" instead of true and then try to refresh or reload and see does it still give the same problem?

1Lot

Without the price constant ladder it works, any way to narrow the error down some more? Where is that part of the code?

vvhg

Hic Rhodos, hic salta.
Reply With Quote
The following user says Thank You to vvhg for this post:
 
  #13 (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


thank you vvhg, this is most helpful.

can you try this attached source. I have commented out the code that does some funny stuff with the price constant ladder. If it works I expect you to see a funny price constant but that is fine, so long as it works. Then I know where the problem is.

See attached source file. Just copy over previous source, recompile it and then reload that template. Price Constant ladder must be set back to True so it runs that area of code.

1Lot

Attached Files
Register to download File Type: cs OneLDOM.cs (89.9 KB, 100 views)
Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:
 
  #14 (permalink)
Elite Member
Northern Germany
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: FDAX, CL
 
vvhg's Avatar
 
Posts: 1,583 since Mar 2011
Thanks: 1,016 given, 2,807 received


1LotTrader View Post
I have to run out, back in a few hours but I believe I have found the error, I just just need you to confirm on that new source file.

Will work on it later this evening when I get back and hopefully by tomorrow we have seen the last of this blue screen.

1Lot

Works fine now, nice work by the way! If NT8 should not come with a really nice DOM, this might be the startpoint for a full blown custom DOM on steroids....(I said before I'd develop one if the NT guys don't so I might jump on board then...) Next steps could be to stick it into a form, then we could easily set rows to display and so on and then hook it up with chart trader, catch the mouse y price and fire preset orders with one click and even manage them with the ATMs...

vvhg

Hic Rhodos, hic salta.
Reply With Quote
The following 4 users say Thank You to vvhg for this post:
 
  #15 (permalink)
Elite Member
Cucamonga, CA
 
Futures Experience: Beginner
Platform: NinjaTrader
Broker/Data: Optimus & Rithmic
Favorite Futures: TF
 
kalalex's Avatar
 
Posts: 197 since Mar 2011
Thanks: 223 given, 126 received

This is great.
2 great minds work on this together

1Lot's DOM's been working fine for me except for when the market's busy and fast.
It lags seriously.
I don't have the top of line computer and I assumed it is the reason
Anyone tried this during a busy hour?

If it's only me I have a perfect reason to buy a new computer.

Reply With Quote
The following user says Thank You to kalalex for this post:
 
  #16 (permalink)
Elite Member
Northern Germany
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: FDAX, CL
 
vvhg's Avatar
 
Posts: 1,583 since Mar 2011
Thanks: 1,016 given, 2,807 received


kalalex View Post
This is great.
2 great minds work on this together

1Lot's DOM's been working fine for me except for when the market's busy and fast.
It lags seriously.
I don't have the top of line computer and I assumed it is the reason
Anyone tried this during a busy hour?

If it's only me I have a perfect reason to buy a new computer.

I only had a glance, but my guess would be that it could be optimized quite a bit. Just thinking out loud, so no offense please: It shouldn't be much heavier than my T&S....and it certainly shouldn't lag....
There is some string stuff in the code, that's always expensive...but if it should be optimized, I'd (not saying I will) put it into a separate form and rewrite large chunks. Some code could be stripped down if it wasn't running on a chart... many things could be stored very cheaply in simple int values with an added overflow method...
But all this would take probably weeks to code....

All this is not to discredit @1LotTraders great work but merely to show fields of optimization!

vvhg

Hic Rhodos, hic salta.
Reply With Quote
The following user says Thank You to vvhg for this post:
 
  #17 (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

Great news on that find.. I will sort that over the next few days and finally we are rid of that crap bug. I will take my time to make an update as I want to just test it properly. So maybe tomorrow end of day I'll release something.

The issue with market slow down is based on the configuration. What actually slows the DOM down in this format more than anything is in fact the screen refresh rate and redraw of the chart. I have quite powerful machines so I had it turned up when I used it.

It can be the case though where in a fast market the refresh rate becomes to fast and bottlenecks your machine. It is just part of the configuration and one of the reasons I actually created it (ability to tune), if you are using one DOM in one market all day you can afford to raise certain settings. If you are using 3 or 4 on different markets the case is different. With Ninja you have a 1 size fits all and generally it is tuned down so that it will work on everyone's pc's. If I compared mine against the Ninja DOM when it was tuned for my setup it easily outperforms the Ninja stock DOM but as I said must be tuned for your setup.

The tuning options would not be hard to expose. It is mainly the refresh rate and also how many levels in the book will activate a refresh. Ninja themselves are only updating the top bids at a high rate and lower bids at a slower rate, of course they are also limiting to 5 or something where as this DOM exposes all levels of the book.

Ideally for optimal performance you would want a custom form as vvhg has mentioned and start from there. It is not hard and if anyone wanted to take on that project I could offer some help in how to do it.

This DOM was my very first attempt and prototype of a DOM which I was able to throw together fairly quickly with the Gom Volume Footprint as a base, the code is by no means clean or optimal but it is good enough for anyone looking to start out with a book. Ninja's book in my opinion is not very nice to look at. I used this one personally for around 4 months but then built my own book outside of Ninja that routes directly through CQG's API which in the end was a better solution for me personally.

At the end of the day this one can be made to work nicely, I used it for some time and learned to read an order book with it.

Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:
 
  #18 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: Euro
 
Posts: 212 since Nov 2010
Thanks: 158 given, 69 received


1LotTrader View Post
Ninja themselves are only updating the top bids at a high rate and lower bids at a slower rate, of course they are also limiting to 5 or something where as this DOM exposes all levels of the book.

All levels of the book? I assumed the futures exchanges only allowed for 5 levels of depth...So Ninja is to blame.



Quoting 
I used this one personally for around 4 months but then built my own book outside of Ninja that routes directly through CQG's API which in the end was a better solution for me personally.

Did I understand you right. So you can build a Dom in its own separate window for Ninja? Can you show us a picture please?:-)

Reply With Quote
 
  #19 (permalink)
Site Administrator
Manta, Ecuador
 
Futures Experience: Advanced
Platform: My own custom solution
Favorite Futures: E-mini ES S&P 500
 
Big Mike's Avatar
 
Posts: 46,240 since Jun 2009
Thanks: 29,353 given, 83,234 received


pbylina View Post
All levels of the book? I assumed the futures exchanges only allowed for 5 levels of depth...So Ninja is to blame.


Did I understand you right. So you can build a Dom in its own separate window for Ninja? Can you show us a picture please?:-)

You can get 10 levels on ES, it will depend on exchange. You can see all 10 levels programatically via NT, but not in the NT DOM.

Mike

Due to time constraints, please do not PM me if your question can be resolved or answered on the forum.

Need help?
1) Stop changing things. No new indicators, charts, or methods. Be consistent with what is in front of you first.
2) Start a journal and post to it daily with the trades you made to show your strengths and weaknesses.
3) Set goals for yourself to reach daily. Make them about how you trade, not how much money you make.
4) Accept responsibility for your actions. Stop looking elsewhere to explain away poor performance.
5) Where to start as a trader? Watch this webinar and read this thread for hundreds of questions and answers.
6)
Help using the forum? Watch this video to learn general tips on using the site.

If you want
to support our community, become an Elite Member.

Reply With Quote
The following 2 users say Thank You to Big Mike for this post:
 
  #20 (permalink)
Elite Member
Chicago, IL
 
Futures Experience: None
Platform: NinjaTrader
Favorite Futures: Euro
 
Posts: 212 since Nov 2010
Thanks: 158 given, 69 received



Big Mike View Post
You can get 10 levels on ES, it will depend on exchange. You can see all 10 levels programatically via NT, but not in the NT DOM.

Mike

Theres more then 10. I can see atleast 18 levels of depth on ASK in 1Lot's video.:-)


Reply With Quote
The following 2 users say Thank You to pbylina 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 05:55 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-15 in 0.18 seconds with 20 queries on phoenix via your IP 54.145.16.43