Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Bar Start time
Collapse
X
-
Hello swooke,
Thanks for your post.
You could use Calculate.OnEachTick and then check DateTime.Now on IsFirstTickOfBar which will tell you the time of the tick that opened the bar.
This would only work for realtime data and would not be relevant for backtesting. If you want a backtestable solution, I recommend adding a single tick data series and checking the timestamp of the tick that occurs just after the bar closure for the primary bar is seen.
IsFirstTickOfBar - https://ninjatrader.com/support/help...ttickofbar.htm
Multi Time Frame and Instruments - https://ninjatrader.com/support/help...nstruments.htm
Please let me know if there is anything else we can do to help.
-
Thanks Jim,
Just one other quick question. How can I get the distance between each candle body? For example, in the screencast link below, I pointed to the gap with a red arrow. I tried BarMarginLeft but that always returns 8 pixels. Here is the screenshot:
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
587 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
341 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
103 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
555 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