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 sastrades, Today, 09:59 AM
|
0 responses
1 view
0 likes
|
Last Post
by sastrades
Today, 09:59 AM
|
||
Started by ZeroKuhl, Yesterday, 04:31 PM
|
5 responses
36 views
0 likes
|
Last Post Today, 09:56 AM | ||
Started by franatas, Today, 01:53 AM
|
2 responses
14 views
0 likes
|
Last Post
by franatas
Today, 09:49 AM
|
||
Started by DawnTreader, 05-08-2024, 05:58 PM
|
8 responses
33 views
0 likes
|
Last Post
by DawnTreader
Today, 09:49 AM
|
||
Started by haas88, 03-21-2024, 02:22 AM
|
19 responses
221 views
0 likes
|
Last Post Today, 09:06 AM |
Comment