For example, will Time[0] give me the DateTime of the start of the current bar or the end?
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Does the built-in Time DataSeries refer to beginning or end of bar?
Collapse
X
-
Does the built-in Time DataSeries refer to beginning or end of bar?
Does the DateTime from builtin Time DataSeries refer to beginning or end of bar?
For example, will Time[0] give me the DateTime of the start of the current bar or the end? -
Hello overflowing,
That will depend on the settings of CalculateOnBarClose (COBC) setting. If COBC is true then it will give you the Time[] at the end of the current bar. If COBC is false, then it will be the Time[] of the incoming tick data from the provider from within the current bar.
You can see more information about COBC on the following link.
http://www.ninjatrader.com/support/h...onbarclose.htm
Here is a forum post that you may want to read that goes over using [] brackets.
http://www.ninjatrader.com/support/f...ad.php?t=19346
Let us know if we can be of further assistance.JCNinjaTrader Customer Service
-
Not quite. That is true for any non-fixed minute chart intervals. For fixed-minute intervals, you will always get the projected time that the bar ends if the bar has not closed, and the time the bar ended if the bar has closed. Those are, of course, the same absolute time.Originally posted by NinjaTrader_JC View PostHello overflowing,
That will depend on the settings of CalculateOnBarClose (COBC) setting. If COBC is true then it will give you the Time[] at the end of the current bar. If COBC is false, then it will be the Time[] of the incoming tick data from the provider from within the current bar.
You can see more information about COBC on the following link.
Here is a forum post that you may want to read that goes over using [] brackets.
Let us know if we can be of further assistance.
Comment
-
i think the simple answer to the original question "will Time[0] give me the DateTime of the start of the current bar or the end" is clearly: End
but i'm not sure i am clear about the COBC issue. if we're talking about a tick-based chart (eg. tick, range, renko, volume), then wouldn't COBC be irrelevant since Time[] always reflects the last incoming tick which is also the then-current last tick (end) of the bar?
makes perfect sense for time-based series to be able to calculate/predict the bar.
thanks in advance for clarifying :-)
cheers,
-e
Comment
-
Hello e-man,
COBC will still be relevant in tick based charts since on a tick based chart you do not know when the end of the bar is going to be so you get the time of each incoming tick of data if COBC is set to false. For example if you are using a 500 Tick chart then use COBC set to true; your indicator/strategy will only run OnBarUpdate() once the bar is closed so you will get all the values at the end of the bar. If COBC is set to false then OnBarUpdate() will run on each incoming tick of data and if you use Time[0] then it will give you the DateTime of that Tick of data.
http://www.ninjatrader.com/support/h....html?time.htm
Let us know if we can be of further assistance.JCNinjaTrader Customer Service
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
580 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
335 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
102 views
0 likes
|
Last Post
by Mindset
02-09-2026, 11:44 AM
|
||
|
Started by Geovanny Suaza, 02-02-2026, 12:30 PM
|
0 responses
554 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
552 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment