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

  #61 (permalink)
Market Wizard
Bangkok
 
Futures Experience: Intermediate
Platform: MultiCharts.NET, S5, Ninj
Broker/Data: AMP, S5, IB
Favorite Futures: ES
 
DionysusToast's Avatar
 
Posts: 2,672 since Nov 2010
Thanks: 777 given, 8,742 received
Forum Reputation: Legendary

It's Euro formatting....

I have the code somewhere - let me dig it out...

Reply With Quote
 
  #62 (permalink)
Elite Member
zürich/ switzerland
 
Futures Experience: None
Platform: NT7, Sierra
Favorite Futures: CL
 
philipp's Avatar
 
Posts: 128 since Nov 2010
Thanks: 48 given, 108 received

had no crash

Reply With Quote
 
  #63 (permalink)
Market Wizard
Bangkok
 
Futures Experience: Intermediate
Platform: MultiCharts.NET, S5, Ninj
Broker/Data: AMP, S5, IB
Favorite Futures: ES
 
DionysusToast's Avatar
 
Posts: 2,672 since Nov 2010
Thanks: 777 given, 8,742 received
Forum Reputation: Legendary


Prices come thru as doubles, so they are unformatted numbers. The numbers from the exchange will be fine. This is an operating system specific issue.

Without looking at the code, I would guess there's some number formatting going on that won't work on PCs with European operating systems where the "," and "." are swapped.

To ensure you get the right separator, you need to use System.Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSeparator

Reply With Quote
The following 3 users say Thank You to DionysusToast for this post:
 
  #64 (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

Freaking commas instead of decimals.. what are you Europeans smoking over there?? lol

Now it makes sense to me why some people were having that crash. I kept thinking, this is impossible what is going on but somehow the process is getting through my coding statement So I changed my code to not kick out the length exception problem by using a Case statement with string compares. Which obviously has stopped the crash but this is still getting through, I'm assuming your TickSizes on instruments show like this then. 0,01?

Thank you for this DionysusToast.

Phillip can you do me one more favour so I can confirm and don't go on a wild goose chase. Can you open your instrument manager and search for Bund and then screen shot it so I can see what your tick size setting looks like in there? I am hoping it is this 0,01.

In the mean time I will start adding some code to catch it.

1Lot

Reply With Quote
The following user says Thank You to 1LotTrader for this post:
 
  #65 (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,354 given, 83,235 received

Yes, some countries localization settings use , instead of . for formatting numbers.

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 user says Thank You to Big Mike for this post:
 
  #66 (permalink)
Market Wizard
Bangkok
 
Futures Experience: Intermediate
Platform: MultiCharts.NET, S5, Ninj
Broker/Data: AMP, S5, IB
Favorite Futures: ES
 
DionysusToast's Avatar
 
Posts: 2,672 since Nov 2010
Thanks: 777 given, 8,742 received
Forum Reputation: Legendary


1LotTrader View Post
Freaking commas instead of decimals.. what are you Europeans smoking over there?? lol

Now it makes sense to me why some people were having that crash. I kept thinking, this is impossible what is going on but somehow the process is getting through my coding statement So I changed my code to not kick out the length exception problem by using a Case statement with string compares. Which obviously has stopped the crash but this is still getting through, I'm assuming your TickSizes on instruments show like this then. 0,01?

Thank you for this DionysusToast.

Phillip can you do me one more favour so I can confirm and don't go on a wild goose chase. Can you open your instrument manager and search for Bund and then screen shot it so I can see what your tick size setting looks like in there? I am hoping it is this 0,01.

In the mean time I will start adding some code to catch it.

1Lot

Well - I'm English - we use the 9,999.99 format. It's the rest of Europe smoking the left handed cigarettes.

The Instrument.MasterInstrument.TickSize in Ninja will still be a regular double which will be fine. A number is a number, regardless of the Operating System. It'll be number formatting more than likely that gives you issues.

Are you using String.Format or Bars.Instrument.MasterInstrument.FormatPrice anywhere?

Most likely thing is a String.Format with a hard coded "." instead of the System.Globalization.NumberFormatInfo.CurrentInfo.NumberDecimalSeparator

Bund on my US Operating system shows up with 999.99 format.

Reply With Quote
The following 2 users say Thank You to DionysusToast for this post:
 
  #67 (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 thanks guys. I have attached a new source.

I tried to change my region to European so that I could replicate and see exactly how it is coming through in the TickSize column but it doesn't seem to alter my ninja settings so I've taken a flying guess I figure the Ticksize can only come through in 1 of 3 ways for Bund:

1. 0.01 (my format)
2. 0,01 (European maybe) - I would've guess this
3. 001 (European maybe) - DionysusToasts comment leads me to think it may be this also.

I have written code to catch all three now so lets see if that solves it. outside chance it puts it through as some other weird conversion but lets see.

1Lot

Attached Files
Register to download File Type: cs OneLDOM.cs (87.9 KB, 108 views)
Reply With Quote
The following 2 users say Thank You to 1LotTrader for this post:
 
  #68 (permalink)
Elite Member
Portland Oregon, United States
 
Futures Experience: Beginner
Platform: Ninjatrader®
Broker/Data: CQG, Kinetick
Favorite Futures: Gameplay Klownbine® Trading of Globex
 
Zondor's Avatar
 
Posts: 1,327 since Jul 2009
Thanks: 1,246 given, 2,635 received

Bids above and offers below last not being cleared

With Level 2 data coming from a TT connection, there is a problem as shown below:

(After I refresh the chart, the erroneous asks below, and bids above, the last price disappear; but then start appearing again as the last price moves.)

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


Last edited by Zondor; September 21st, 2012 at 04:36 PM.
Reply With Quote
 
  #69 (permalink)
Elite Member
Denver, CO
 
Futures Experience: Advanced
Platform: NinjaTrader
Broker/Data: NinjaTrader Brokerage
Favorite Futures: ES
 
NinjaTrader's Avatar
 
Posts: 1,260 since May 2010
Thanks: 153 given, 1,890 received

Hi Guys,

I just loosely read this thread... Here is an unsupported tip that might help...again not sure since I just scanned this thread...

string numberDisplay = Bars.Instrument.MasterInstrument.FormatPrice(price, Cbi.Globals.CurrentCulture);

I believe this will return a string representation of the price based on current PC regional settings.

Reply With Quote
The following 4 users say Thank You to NinjaTrader for this post:
 
  #70 (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
With Level 2 data coming from a TT connection, there is a problem as shown below:

(After I refresh the chart, the erroneous asks below, and bids above, the last price disappear; but then start appearing again as the last price moves.)

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

Go to the options menu, down to the performance area and switch on the IB option. That might sort it. There is a feed specific issue in OnMarketDepth where for some feeds, it does not automatically fire a clear event. This happens on IB, I have never tested the TT feed but it is likely the same problem. Just set it to True and let me know. I'm quite certain that will sort it. I will amend that option to say IB/TT - can you confirm for me?

Reply With Quote
The following user says 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 11:23 AM.

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.13 seconds with 20 queries on phoenix via your IP 54.226.34.209