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 Haiasi, Today, 06:53 PM
|
1 response
4 views
0 likes
|
Last Post Today, 07:05 PM | ||
Started by ScottWalsh, Today, 06:52 PM
|
1 response
13 views
0 likes
|
Last Post Today, 07:02 PM | ||
Started by ScottW, Today, 06:09 PM
|
1 response
5 views
0 likes
|
Last Post Today, 06:53 PM | ||
Started by ftsc2022, 10-25-2022, 12:03 PM
|
5 responses
256 views
0 likes
|
Last Post Today, 06:48 PM | ||
Started by Board game geek, 10-29-2023, 12:00 PM
|
14 responses
244 views
0 likes
|
Last Post
by DJ888
Today, 05:38 PM
|
Comment