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 rocketman7, Today, 01:00 AM
|
1 response
9 views
0 likes
|
Last Post Today, 07:22 AM | ||
Started by wzgy0920, 04-23-2024, 09:53 PM
|
3 responses
76 views
0 likes
|
Last Post Today, 07:22 AM | ||
Started by JonesJoker, 04-22-2024, 12:23 PM
|
9 responses
46 views
0 likes
|
Last Post Today, 07:21 AM | ||
Started by timko, Today, 06:45 AM
|
1 response
7 views
0 likes
|
Last Post
by gaz0001
Today, 07:18 AM
|
||
Started by Waxavi, 04-19-2024, 02:10 AM
|
3 responses
41 views
0 likes
|
Last Post
by gaz0001
Today, 07:14 AM
|
Comment