How does NinjaTrader build Chart Bars?
Previous Topic  Next Topic 

There are many variables that are used to build a bar chart.


Bar Time Stamp
NinjaTrader stamps a bar with the closing time of the bar. For example, a minute bar with a time of 9:31:00 AM has data from 9:30:00 AM through 9:30:59 AM.


Different Data Feeds

Different data feeds produce different charts especially when using tick based intervals vs time based intervals. Market data vendors each employ various methods for tick filtering, throttling and time stamping. As a result, no data stream is 100% identical and thus can cause subtle differences in charts. Since NinjaTrader supports many of the leading brokerage and data feed technologies, its guaranteed that two traders using NinjaTrader on different data feeds will have minor differences when plotting the same market and time interval.


Time Settings

Different session start and end time values as well as look back period can affect the chart display and indicator values.


Real-Time Tick Filter

If you have the real-time tick filter enabled, it is possible that your offset percent (the percent away a tick is in value from the last traded price to be considered a bad tick) may be too tight and thus a good tick (gap up/down on session open for example) could be excluded from the bar.


Base Data used to Build Bars

A chart bar (interval type) requires a base data value as its source for bar construction. Following are NinjaTrader supported interval types and their required base data values.


Tick                - tick data

Volume        - tick data

Range        - tick data

Second        - tick data

Minute        - minute bar data

Day                - daily bar data

Week                - daily bar data

Month        - daily bar data

Year                - daily bar data


This is important to understand since if you are connected to a market data vendor that does not support "daily data" you will not be able to build chart bars that use "daily data" as its base data. A matrix of support vendors and their varying levels of service is located here.


Why can my chart look different after reloading historical data from the server?

As ticks come into NinjaTrader in real-time, they are time stamped based on your local PC time if they do not already have an associated time stamp that is provided from the real-time data source. The majority of our supported brokerage feeds DO NOT time stamp ticks where most of our supported market data vendor feeds do provide time stamped ticks. NinjaTrader then builds bars based on the time stamp of the incoming tick and displays these bars in your chart in real-time.


Let's say you have a tick (tick "A") with a time stamp of 10:31:00 AM which gets packaged into the 10:32:00 AM bar and happens to be the high of that bar. An hour later, you reload historical data from your historical data provider into NinjaTrader. This process will overwrite the existing data. The 10:32:00 AM bar now looks different since the high made by TICK "A" is now part  of the prior bar, 10:31:00 AM. How is this possible?



The only way to ensure that data always looks the same is if every connectivity provider sent ticks with time stamps AND that all vendors synchronized on time stamps. Unfortunately, this is just not a reality nor plausible.


Loading Historical Data

More information can be found here.