is it possible to retrieve how many minutes has a bar in total? I don't mean when a bar is supposed to end. I need to know the time of a bar in a strategy.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Minutes of a bar
Collapse
X
-
Hello guillembm,
Thank you for your note.
The following would print to the output window the time frame, for example 60 minute, of the bar series the strategy/indicator is running on.
Code:Print(Bars.BarsPeriod.ToString());
Alan P.NinjaTrader Customer Service
-
This doesn't seem to be supported.
I get this error: "'NinjaTrader.Data.Bars' does not contain a definition for 'BarsPeriod' and no extension method 'BarsPeriod' accepting a first argument of type 'NinjaTrader.Data.Bars' could be found (are you missing a using directive or an assembly reference?)"
Comment
Latest Posts
Collapse
Topics | Statistics | Last Post | ||
---|---|---|---|---|
Started by AaronKTradingForum, Today, 03:44 PM
|
0 responses
1 view
0 likes
|
Last Post Today, 03:44 PM | ||
Started by Felix Reichert, 04-26-2024, 02:12 PM
|
11 responses
72 views
0 likes
|
Last Post Today, 03:18 PM | ||
Started by junkone, 04-28-2024, 02:19 PM
|
7 responses
82 views
1 like
|
Last Post
by junkone
Today, 03:15 PM
|
||
Started by pechtri, 06-22-2023, 02:31 AM
|
11 responses
136 views
0 likes
|
Last Post
by Nyman
Today, 02:59 PM
|
||
Started by ageeholdings, 05-01-2024, 05:22 AM
|
4 responses
27 views
0 likes
|
Last Post
by ageeholdings
Today, 02:59 PM
|
Comment