Thanks!
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
Chart Class?
Collapse
X
-
Hey bud, try something like this:
private string ThisChart;
if( CurrentBar < 1)
{
if (Bars.Period.Id == PeriodType.Tick)
ThisChart = "Tick";
if (Bars.Period.Id == PeriodType.Minute)
ThisChart = "Minute";
if (Bars.Period.Id == PeriodType.Second)
ThisChart = "Second";
if (Bars.Period.Id == PeriodType.Range)
ThisChart = "Range";
}
Print("The chart is " + Bars.Period.Value + ThisChart);
-
Aha, OK that's what I was looking for... so the Bars class has that info in it? Fantastic, thank you!Originally posted by eDanny View PostHey bud, try something like this:
private string ThisChart;
if( CurrentBar < 1)
{
if (Bars.Period.Id == PeriodType.Tick)
ThisChart = "Tick";
if (Bars.Period.Id == PeriodType.Minute)
ThisChart = "Minute";
if (Bars.Period.Id == PeriodType.Second)
ThisChart = "Second";
if (Bars.Period.Id == PeriodType.Range)
ThisChart = "Range";
}
Print("The chart is " + Bars.Period.Value + ThisChart);
Bryan
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by kinfxhk, 07-14-2026, 09:39 AM
|
0 responses
127 views
0 likes
|
Last Post
by kinfxhk
07-14-2026, 09:39 AM
|
||
|
Started by kinfxhk, 07-13-2026, 10:18 AM
|
0 responses
105 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 10:18 AM
|
||
|
Started by kinfxhk, 07-13-2026, 09:50 AM
|
0 responses
85 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 09:50 AM
|
||
|
Started by kinfxhk, 07-13-2026, 07:21 AM
|
0 responses
105 views
0 likes
|
Last Post
by kinfxhk
07-13-2026, 07:21 AM
|
||
|
Started by kinfxhk, 07-11-2026, 02:11 AM
|
0 responses
86 views
0 likes
|
Last Post
by kinfxhk
07-11-2026, 02:11 AM
|

Comment