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 Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
636 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
366 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
107 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
568 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
571 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment