NexusFi: Find Your Edge


Home Menu

 





The Truth: NinjaTrader


Discussion in NinjaTrader

Updated
      Top Posters
    1. looks_one Fat Tails with 120 posts (165 thanks)
    2. looks_two Big Mike with 54 posts (93 thanks)
    3. looks_3 MetalTrade with 43 posts (10 thanks)
    4. looks_4 ZTR with 41 posts (25 thanks)
      Best Posters
    1. looks_one AynRandFan with 34 thanks per post
    2. looks_two Big Mike with 1.7 thanks per post
    3. looks_3 Fat Tails with 1.4 thanks per post
    4. looks_4 NinjaTrader with 0.9 thanks per post
    1. trending_up 361,958 views
    2. thumb_up 802 thanks given
    3. group 145 followers
    1. forum 1,059 posts
    2. attach_file 65 attachments




 
Search this Thread

The Truth: NinjaTrader

  #661 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


ThatManFromTexas View Post
Disclaimer: This post does not represent the view point of the owners, managers, or moderators of this web site and is not intended as a slam against any moderator, board member, any banned former members whose name we dare not say, any other living person, any recently living person or any person or persons whose status we are not sure of and especially not for any platform vendor with a questionable product and a pit bull lawyer. This post is meant purely for entertainment and should not be confused with a real thought.

Real thoughts come only after having posted. Everybody knows that it is impossible to think and write at the same time. After all we only have a single conscience.

Reply With Quote

Can you help answer these questions
from other members on NexusFi?
Pivot Indicator like the old SwingTemp by Big Mike
NinjaTrader
Trade idea based off three indicators.
Traders Hideout
Quant vue
Trading Reviews and Vendors
REcommedations for programming help
Sierra Chart
How to apply profiles
Traders Hideout
 
  #662 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103

A short note on the OpeningRange V31 and Initial Balance Range Bands V31 Indicators.

There are several NinjaTrader bugs that affect the indicator and occur, when you use it on volume or tick bars with very small periods. The bugs are the consequence of a strange use of NinjaTrader time stamps.

Example:

The RTH session for ES starts at 8:30 Central Time. Let us assume that you use a session template, which allows to separate the night session from the day session. The night session ends at 8:30, the day session starts at 8:30. Now for the time stamps the following applies:

Minute Bars: The bar stamped 8:30:00 AM belongs to the night session.

Tick and Volume bars: The last bar of the night session has the time stamp 8:29:59 or earlier. If there are bars that have the time stamp 8:30:00, they belong to the new session.

This solution is not very useful, but contributes to general confusion.


How do I confuse myself ?

Following the strange decision that some bars time-stamped 8:30:00 belong to the prior, and some bars to the following session, there is a number of bugs affecting NinjaScript methods.

Bug #1: If you apply Bars.Session.GetNextBeginEnd() to bars with a time stamp 0f 8:30:00, it will return the session start for the night session. For minute bars this is correct, but for tick and volume bars timestamped with 8:30:00 this is right away false.

Bug #2: When data is loaded from the cache, and there are several tick or volume bars with a time stamp of 8:30:00, they are all qualified as FirstBarsOfSession, so the condition Bars.FirstBarsOfSession is always reutrned as true. So I have had charts with 10 consecutive first session bars.


Solution

The problem that some bars with the time-stamp 8:30:00 belong to the prior and some to the following session will confuse NinjaTrader developers and NinjaTrader users in the same way. The best idea would be to change this.

Although it is certainly possible to correct the NinjaScript methods Bars.Session.GetNextBeginEnd() and Bars.FirstBarOfSession, this would not help users, who will be confused when they have to apply that strange logic.

Example attached: Same problems appear on Better Renko charts, as they are built from ticks as well.

Attached Thumbnails
Click image for larger version

Name:	FirstBarOfSession.jpg
Views:	151
Size:	97.7 KB
ID:	35158   Click image for larger version

Name:	GetNextBeginEnd.jpg
Views:	150
Size:	99.9 KB
ID:	35159  
Reply With Quote
Thanked by:
  #663 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,714 since May 2010
Thanks Given: 203
Thanks Received: 2,686



monpere View Post
I had a pretty good support experience with NT recently. I am trying to setup the single stock futures of the SPY etf (SPYM1C) with Interactive Brokers, and keep getting errors. I opened an issue with NT support, and the analyst was very responsive, schedule a time to call me on the phone and connect remotely to my machine to diagnose the problem. Is that normal for NT support, or was that an anomaly?

Absolutely this is normal.

Since we only offer electronic inbound channels (email, web form and support forum) for support, there is often an initial misconception that we do not provide telephone support. This could not be further from the truth. All inbound inquiries funnel into a centralized help desk system that is managed by a team of twenty plus technical support representatives. It is our policy to resolve inquiries accurately and quickly and each support team member is encouraged to utilize telephone, remote PC login or direct users to private training sessions if they feel that it is required to reach client satisfaction. We implemented this support model early in our existence since we felt it would be the most effective way to administer support to a large, time sensitive user base in an efficient and cost effective manner.

Follow me on Twitter Reply With Quote
  #664 (permalink)
 
NinjaTrader's Avatar
 NinjaTrader  NinjaTrader is an official Site Sponsor
Site Sponsor

Web: NinjaTrader
AMA: Ask Me Anything
Webinars: NinjaTrader Webinars
Elite offer: Click here
 
Posts: 1,714 since May 2010
Thanks Given: 203
Thanks Received: 2,686


Fat Tails View Post
A short note on the OpeningRange V31 and Initial Balance Range Bands V31 Indicators.

There are several NinjaTrader bugs that affect the indicator and occur, when you use it on volume or tick bars with very small periods. The bugs are the consequence of a strange use of NinjaTrader time stamps.

Example:

The RTH session for ES starts at 8:30 Central Time. Let us assume that you use a session template, which allows to separate the night session from the day session. The night session ends at 8:30, the day session starts at 8:30. Now for the time stamps the following applies:

Minute Bars: The bar stamped 8:30:00 AM belongs to the night session.

Tick and Volume bars: The last bar of the night session has the time stamp 8:29:59 or earlier. If there are bars that have the time stamp 8:30:00, they belong to the new session.

This solution is not very useful, but contributes to general confusion.


How do I confuse myself ?

Following the strange decision that some bars time-stamped 8:30:00 belong to the prior, and some bars to the following session, there is a number of bugs affecting NinjaScript methods.

Bug #1: If you apply Bars.Session.GetNextBeginEnd() to bars with a time stamp 0f 8:30:00, it will return the session start for the night session. For minute bars this is correct, but for tick and volume bars timestamped with 8:30:00 this is right away false.

Bug #2: When data is loaded from the cache, and there are several tick or volume bars with a time stamp of 8:30:00, they are all qualified as FirstBarsOfSession, so the condition Bars.FirstBarsOfSession is always reutrned as true. So I have had charts with 10 consecutive first session bars.


Solution

The problem that some bars with the time-stamp 8:30:00 belong to the prior and some to the following session will confuse NinjaTrader developers and NinjaTrader users in the same way. The best idea would be to change this.

Although it is certainly possible to correct the NinjaScript methods Bars.Session.GetNextBeginEnd() and Bars.FirstBarOfSession, this would not help users, who will be confused when they have to apply that strange logic.

Example attached: Same problems appear on Better Renko charts, as they are built from ticks as well.

Hi Fat Tails,

Good observations. The difference you are seeing between minute bars vs. tick/volume bars is actually expected based on how the bars are built though.

A 8:30:00 bar for a minute bar contains information from 8:29:00 to 8:29:59 and is timestamped as 8:30:00. The 8:31 bar contains 8:30:00 to 8:30:59. You can see how it is very distinct in the cutoff point. The 8:30:00 bar actually contains information that is not of the current session. It contains info in the “prior” session or before the session begin.

For a tick/volume chart, because ticks come in at various microseconds which is not shown with the seconds granularity of timestamps, the 8:30:00 AM bar can actually be representing something like 8:30:00.100 to 8:30:00.400. This would still come up as 8:30:00AM, but it actually represents ticks that were after the session begin so it would be applicable for the current session. This is why you see the behavior with Bars.Session.GetNextBeginEnd(). The minute bar of 8:30 does not contain any information for the current session, but the tick bar very well can while both showing the same timestamp due to timestamps only going to the seconds granularity and not more.

For bug #2, this was recently identified and is resolved for our next release, 7.0.1000.5. Please try again in the next release and you should not see it tag multiple bars as FirstBarOfSession off a cache load of your chart.

Follow me on Twitter Reply With Quote
Thanked by:
  #665 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


NinjaTrader View Post
Hi Fat Tails,


For a tick/volume chart, because ticks come in at various microseconds which is not shown with the seconds granularity of timestamps, the 8:30:00 AM bar can actually be representing something like 8:30:00.100 to 8:30:00.400. This would still come up as 8:30:00AM, but it actually represents ticks that were after the session begin so it would be applicable for the current session. This is why you see the behavior with Bars.Session.GetNextBeginEnd(). The minute bar of 8:30 does not contain any information for the current session, but the tick bar very well can while both showing the same timestamp due to timestamps only going to the seconds granularity and not more.

Bug #1: We did not understand each other here.

The bars with the time stamp 8:30:00, which come after the session begin return the session begin of the prior session. So if I apply GetNextBeginEnd() to that new session 8:30:00 bar, it will return yesterday 15:30:00 as the session begin, which is obviously false!

Reply With Quote
  #666 (permalink)
 gomi 
Paris
Market Wizard
 
Experience: None
Platform: NinjaTrader
Posts: 1,270 since Oct 2009
Thanks Given: 282
Thanks Received: 4,505

I had the same issue as Bug#1, but never managed to get past the usual "by design" motto..
Problems with ticks happening at session EndTime - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

If you have a session rolling from 6:00 day N to 6:00 day N+1, and you ask GetNextBeginEnd at 6:00 day N+1, you will be sent to the session of the previous day N.

To me this is false because as Ray pointed out, ticks timestamped 6:00:00 happen between 6:00:00.000 and 6:00:00.999, so in any case they are posterior to 06:00:00.00 and thus belong to N+1 day.

Reply With Quote
Thanked by:
  #667 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


gomi View Post
I had the same issue as Bug#1, but never managed to get past the usual "by design" motto..
Problems with ticks happening at session EndTime - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

If you have a session rolling from 6:00 day N to 6:00 day N+1, and you ask GetNextBeginEnd at 6:00 day N+1, you will be sent to the session of the previous day N.

To me this is false because as Ray pointed out, ticks timestamped 6:00:00 happen between 6:00:00.000 and 6:00:00.999, so in any case they are posterior to 06:00:00.00 and thus belong to N+1 day.

Thanks for confirming this. I agree that it is simply false.

I was not aware of your thread, otherwise I would have posted there.

Reply With Quote
  #668 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: Stage5, FCM:Dorman, Data:Denali, Routing:Teton
Trading: YM ES NQ
Posts: 474 since Nov 2009
Thanks Given: 219
Thanks Received: 603


gomi View Post
I had the same issue as Bug#1, but never managed to get past the usual "by design" motto..
Problems with ticks happening at session EndTime - [AUTOLINK]NinjaTrader[/AUTOLINK] Support Forum

If you have a session rolling from 6:00 day N to 6:00 day N+1, and you ask GetNextBeginEnd at 6:00 day N+1, you will be sent to the session of the previous day N.

To me this is false because as Ray pointed out, ticks timestamped 6:00:00 happen between 6:00:00.000 and 6:00:00.999, so in any case they are posterior to 06:00:00.00 and thus belong to N+1 day.

Ninja timestamps their bars at bar close. Maybe if they timestamped bars at bar open, as Sierra Chart and other platforms do, this issue would be moot.

Reply With Quote
  #669 (permalink)
 
Fat Tails's Avatar
 Fat Tails 
Berlin, Europe
Market Wizard
 
Experience: Advanced
Platform: NinjaTrader, MultiCharts
Broker: Interactive Brokers
Trading: Keyboard
Posts: 9,888 since Mar 2010
Thanks Given: 4,242
Thanks Received: 27,103


tomgilb View Post
Ninja timestamps their bars at bar close. Maybe if they timestamped bars at bar open, as Sierra Chart and other platforms do, this issue would be moot.

This is just a rounding issue. A tick bar that closes at 8:30:00:150 (150 milliseconds), will be rounded to 8:30:00:000.

If you use something like 5 tick bars on ES, you can well have 10 consecutive bars that close prior to 8:30:00:500. All these 10 bars will be rounded to 8:30:00. Then with this time stamp, if you call GetNextBegindEnd(), they will all be affected to the old session, although they belong to the new session.

The opening range indicator for example takes the first bar of the session, then determines the session begin time via GetNextBeginEnd(). Then the duration of the opening range duration is added to calculate the end time of the opening range. The bug produces an end time within the prior session, as GetNextBeginEnd() returns the false session. So the opening range is abruptly closed after the first bar, as the duration has already been exceeded.

Only happens to scalpers with a first bar that closes after less than 500 milliseconds after the session open. Never happened to me, so only know this, because I had several complaints.

Reply With Quote
  #670 (permalink)
 Sawtooth 
Prescott AZ USA
 
Experience: Advanced
Platform: SierraChart
Broker: Stage5, FCM:Dorman, Data:Denali, Routing:Teton
Trading: YM ES NQ
Posts: 474 since Nov 2009
Thanks Given: 219
Thanks Received: 603



Fat Tails View Post
This is just a rounding issue. A tick bar that closes at 8:30:00:150 (150 milliseconds), will be rounded to 8:30:00:000.

If you use something like 5 tick bars on ES, you can well have 10 consecutive bars that close prior to 8:30:00:500. All these 10 bars will be rounded to 8:30:00. Then with this time stamp, if you call GetNextBegindEnd(), they will all be affected to the old session, although they belong to the new session.

The opening range indicator for example takes the first bar of the session, then determines the session begin time via GetNextBeginEnd(). Then the duration of the opening range duration is added to calculate the end time of the opening range. The bug produces an end time within the prior session, as GetNextBeginEnd() returns the false session. So the opening range is abruptly closed after the first bar, as the duration has already been exceeded.

Only happens to scalpers with a first bar that closes after less than 500 milliseconds after the session open. Never happened to me, so only know this, because I had several complaints.

At any rate, it seem strange to me that (e.g. on a 3 min chart) Ninja's RTH opening bar is stamped 09:33:00 (ET), and Sierra's is stamped 09:30:00, yet all of the ticks inside that bar are timestamped > 09:30:00 and < 09:33:00. Therefore Ninja's 3min bar timestamp is ahead of all of the tick's timestamps within. Wouldn't Ninja's futuristic timestamp be a problem on any timeframe when program calls are made on the bar's timestamp?

Reply With Quote




Last Updated on April 22, 2017


© 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