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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
132 views
1 like
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
74 views
1 like
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
117 views
2 likes
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
113 views
1 like
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
89 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment