Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Current time of the bar
Collapse
X
-
Hello cay7man,
Bars in NinjaTrader are marked by the close time of the bar.
If the time is 9:23, the 30 minute bar would close at 9:30.
If you want to show the time of each tick, you would need to a 1 tick series or a 1 second series with AddDataSeries().
https://ninjatrader.com/support/help...dataseries.htm
If you want to show the computer time you can print Core.Globals.Now.Chelsea B.NinjaTrader Customer Service
- Likes 1
-
Hello cay7man,
The BarsPeriod would be BarsPeriodType.Second and the value would be 1.
AddDataSeries(null, BarsPeriodtype.Second, 1);
In OnBarUpdate() this becomes BarsInProgress index 1, Times[1][0], Closes[1][0], etc.
if (BarsInProgress == 1)
{
Print(string.Format("{0} | BarsInProgress: {1}, CurrentBars[1]: {2}", Times[1][0], BarsInProgress, CurrentBars[1]));
}
Chelsea B.NinjaTrader Customer Service
- Likes 1
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
57 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
78 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
39 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
101 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
61 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment