Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Last bar in other time frame
Collapse
X
-
Last bar in other time frame
Is there a way to check the last bar of 5 minute time frame while the indicator run in 1 minute time frame?Tags: None
-
It is an indicator running on 1 minute chart and I already added the 5 minute time frame in the Initialize section. I just want to know if the bar is the last close historical bar in 5 minute chart.
Comment
-
Hello edward_bell,
Thanks for your reply.
Assuming that the 5 minute data series is the only added data series. If you are running with CalculateOnbarClose = true then you can refer to the close of the last historical bar with Closes[1][0] where 1 refers to the 5 minute added data series and [0] refers to the last completed 5 minute bar.
If you are using CalculateOnBarClose = false, and connected to live or replay data, then use Closes[1][1] where the first 1 refers to the 5 minute data series and the second 1 will refer to the last completed bar of the 5 minute data series. Note that in this case Closes[1][0] would refers to the currently forming 5 minute bar.
For a complete understanding please review: http://ninjatrader.com/support/helpG...nstruments.htm in particular the section " How Bar Data is Referenced " for a good illustration of the differences.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Geovanny Suaza, 02-11-2026, 06:32 PM
|
0 responses
660 views
0 likes
|
Last Post
|
||
|
Started by Geovanny Suaza, 02-11-2026, 05:51 PM
|
0 responses
375 views
1 like
|
Last Post
|
||
|
Started by Mindset, 02-09-2026, 11:44 AM
|
0 responses
110 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
574 views
1 like
|
Last Post
|
||
|
Started by RFrosty, 01-28-2026, 06:49 PM
|
0 responses
579 views
1 like
|
Last Post
by RFrosty
01-28-2026, 06:49 PM
|

Comment