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

  #141 (permalink)
Elite Member
az
 
Futures Experience: Intermediate
Platform: tos
Broker/Data: tos td ib
Favorite Futures: futures
 
Posts: 5 since Apr 2010
Thanks: 0 given, 1 received

Yeah CME guys need to subscribe if they want the full book I believe. Retail really gets the fist when it comes to stuff like this.

I trade /TF and have the level 2 on the chart - similar to the one found on the NT forums.

TF = WIN

Reply With Quote
 
  #142 (permalink)
Elite Member
az
 
Futures Experience: Intermediate
Platform: tos
Broker/Data: tos td ib
Favorite Futures: futures
 
Posts: 5 since Apr 2010
Thanks: 0 given, 1 received

I swore I saw more than 10 levels available on a subscription basis - I could be wrong. I can't find anything about it now.

Reply With Quote
 
  #143 (permalink)
Elite Member
denver, colorado
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: ZS
 
Surly's Avatar
 
Posts: 704 since Mar 2011
Thanks: 628 given, 1,242 received

question about defaults


Thanks @1LotTrader! This looks like a great resource, eager to see it in action tomorrow (just installed today). I am having trouble setting the indicator's default values for the width of the various columns. I set them all to -30 with a smaller font (12) so I can see more on my screen - however when I ask NT to set these values as default I cannot. Any advice for me? I find that even if I save my workspace, the chart still comes up with the default (0) width values. Also, when I save the setup as a new template, it still reverts to zero rather than the -30 I want.

Sorry if this is more to do with NT than with this specific indicator but thanks in advance for any help!

surly

Seek freedom and become captive of your desires. Seek discipline and find your liberty. - Frank Herbert
Reply With Quote
The following user says Thank You to Surly for this post:
 
  #144 (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

No worries, I'll have a look. I remember having a similar issue some years ago and can't remember off hand how I resolved it. Very likely I have done something funny with the parameters. Will check and let you know.

1Lot

Reply With Quote
The following user says Thank You to 1LotTrader for this post:
 
  #145 (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, new source attached, that was the result of some real sloppy late night coding on my part. I copied and pasted some XMLignore stuff that I shouldn't have and forgot to Serialize the Font properties.

Should be ok now, let me know if it's good.

Thanks
1Lot

Attached Files
Register to download File Type: cs OneLDOM.cs (89.2 KB, 115 views)
Reply With Quote
The following 5 users say Thank You to 1LotTrader for this post:
 
  #146 (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

Really nice work with your order book.
I'm still thinking about how to give it the ability to trade from it....
Tapping into ChartTrader would be no problem, market orders, close, reverse, limit @bid/ask would be at our fingertips. But to execute orders at a specific level that is not enough...
Maybe, though unlikely, we could find a way to change the price on the latter...
The other way would be to see if we find a way to use the right click menu:
Please register on futures.io to view futures trading content such as post attachment(s), image(s), and screenshot(s).


The question would be if the event raised by this carries the price information with it and can thus be manipulated or if it straps the mouse y "under the hood" to get the price.

The other difficulty would be making sure to avoid any patent issues...

vvhg

Hic Rhodos, hic salta.
Reply With Quote
 
  #147 (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

Yes there are a number of complicating factors. Specifically around entering orders and some others like the simulation environment itself which gives out some glorious fills. It was for these reasons that in the end I moved off of it and to my own stuff which I wrote from scratch.

The patent thing I believe is a non-issue. I did some research and it seems that in order for TT's DOM patent to stand up, one must violate all issues in the patent, I've read through it and these include a number of things. If just one element is different then the patent is no longer valid.

In this case it does not match TT's patent on a number of grounds but a key one is that their patent covers a static price ladder. In this instance because it is done on the chart and the chart has automatic vertical Y scaling on the underlying data series it could not be considered static.

It is not immediately evident but the price scale is in fact moving at times and this is happening automatically which would make it dynamic.

I believe this in itself brings the DOM outside any potential patent issues.

So adding one click order entry functionality is rather an issue of whether it's worth the effort given the base is not ideal in the first place. In terms of carrying it out, i believe it would either be a case of creating some hit boxes on the chart that align with the bid/ask blocks or you get the co-ordinates from the chart and convert to the Y Values.

I know it's possible to grab the price with the mouse as I've seen some other guys doing some stuff with it. The only thing I am unsure of is if they used some sort of function like HitTest and whether those results will extend to the full chart area or just the underlying data series which would be an issue.

Have a look at these couple of links for ideas of getting chart co-ordinates. I have not checked what Ninja has exposed in this regard but it will give you some ideas:

c# - Getting x-coordinate on Chart from mouse click - Stack Overflow

c# - finding the value of the points in a chart - Stack Overflow

Cheers
1Lot


Last edited by 1LotTrader; October 30th, 2012 at 11:12 AM.
Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:
 
  #148 (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 a number of complicating factors. Specifically around entering orders and some others like the simulation environment itself which gives out some glorious fills. It was for these reasons that in the end I moved off of it and to my own stuff which I wrote from scratch.

The patent thing I believe is a non-issue. I did some research and it seems that in order for TT's DOM patent to stand up, one must violate all issues in the patent, I've read through it and these include a number of things. If just one element is different then the patent is no longer valid.

In this case it does not match TT's patent on a number of grounds but a key one is that their patent covers a static price ladder. In this instance because it is done on the chart and the chart has automatic vertical Y scaling on the underlying data series it could not be considered static.

It is not immediately evident but the price scale is in fact moving at times and this is happening automatically which would make it dynamic.

I believe this in itself brings the DOM outside any potential patent issues.

So adding one click order entry functionality is rather an issue of whether it's worth the effort given the base is not ideal in the first place. In terms of carrying it out, i believe it would either be a case of creating some hit boxes on the chart that align with the bid/ask blocks or you get the co-ordinates from the chart and convert to the Y Values.

I know it's possible to grab the price with the mouse as I've seen some other guys doing some stuff with it. The only thing I am unsure of is if they used some sort of function like HitTest and whether those results will extend to the full chart area or just the underlying data series which would be an issue.

Have a look at these couple of links for ideas of getting chart co-ordinates. I have not checked what Ninja has exposed in this regard but it will give you some ideas:

c# - Getting x-coordinate on Chart from mouse click - Stack Overflow

c# - finding the value of the points in a chart - Stack Overflow

Cheers
1Lot

Getting the price of a y value is very easy, but to trade from it I believe the order book should rather be in its own form, not too different from eg. vvAggregatedTS or similar. This way it would be easy to add some nice buttons for order entry and ideally fields for account ATM strategy and quantity. The trick would be to execute the context menu entries from code at a programmatically set price level.
I guess at that level we would do something to stay well clear of the TT patent, just to make sure. That shouldn't be too hard, I already have got a few ideas.

vvhg

Hic Rhodos, hic salta.
Reply With Quote
 
  #149 (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

Yes a separate form is better but then essentially you will be starting it again from scratch, which then begs the question why bother writing it in Ninja if you are going to write custom forms, may as well write standalone and have complete control. This was the conclusion I came to myself.

Regards the actual placing of orders on Ninja and management, ATM's and all the rest of it I can't really offer much on that as I didn't delve to deeply into it. The ATI allows for order placing through the DLL interface but it is hardly ever updated and I'm not sure how much control it allows. Only other way around that would be finding some unsupported exposed functions I guess.

Again though if you go through all this hassle, is it worth it? if you want to build it from scratch adding all these layers adds extra unnecessary time. You see what I did in the end, I wrote a completely standalone book and then hooked it directly into CQG's interface. There are so many advantages for instance, going via this route, I was able to get CQG to reconfigure my account set up to route directly through there main European data Centre, as close to Eurex without the bouncing to the United States that will happen with many other connections and account types.

At the end of the day it's just a question of where do you want to take it and how far do you want to go, time to invest etc., for me, once having decided to undertake the task, adding all these unnecessary endless layers/wrappers made no sense.

I stripped it all out and went to the source . My book orders average around 40m/s working on Eurex, some days better but rarely worse. The main amount of time I give up is between my house and the main port, i live on an island in a rural setting and the line is not as great quality from here to the port, it takes as much time to go from my house to the port as it does the whole trip to Frankfurt and back. At the end of the day I could make it even faster but I like the smell of cowsh!t in the morning, so what can you do.. lol

1Lot

Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:
 
  #150 (permalink)
Elite Member
denver, colorado
 
Futures Experience: Intermediate
Platform: NT
Favorite Futures: ZS
 
Surly's Avatar
 
Posts: 704 since Mar 2011
Thanks: 628 given, 1,242 received


apologies for asking this q here: I copied the .cs file into my /bin/custom folder but do I need to change the name to match the .cs file already there before I compile? thanks!

Seek freedom and become captive of your desires. Seek discipline and find your liberty. - Frank Herbert
Reply With Quote

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 08:49 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-13 in 0.16 seconds with 20 queries on phoenix via your IP 54.160.245.121