Thanks.
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Know the time frame in realtime
Collapse
X
-
Know the time frame in realtime
How can I know the time frame of my chart in real time? I want to print it, for example, in the output window. So if my Automatic Strategie is working in Fut. S&P in a chart of 5 minutes, I would like to have a variable with "5 minutes".
Thanks.Tags: None
-
if (BarsPeriod.Id == PeriodType.Tick && BarsPeriod.Value > 100)Originally posted by soyjesus View PostHow can I know the time frame of my chart in real time? I want to print it, for example, in the output window. So if my Automatic Strategie is working in Fut. S&P in a chart of 5 minutes, I would like to have a variable with "5 minutes".
Thanks.
Print("This is a tick chart of over 100 ticks per bar");
Other possibilities are PeriodType.Range, PeriodType.Minute, etc. the BarsPeriod.Value is length.
Mike
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by CaptainJack, 04-24-2026, 11:07 PM
|
0 responses
18 views
0 likes
|
Last Post
by CaptainJack
04-24-2026, 11:07 PM
|
||
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
120 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
174 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
92 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
134 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|

Comment