switch (BasePeriodType)
{
case "Tick":
Add(PeriodType.Tick, BarsPeriod.Value * this.HigherTimeframeMultiple);
break;
case "Minute":
Add(PeriodType.Minute, BarsPeriod.Value * this.HigherTimeframeMultiple);
break;
}
Announcement
Collapse
No announcement yet.
Partner 728x90
Collapse
NinjaTrader
BasePeriodType
Collapse
X
-
BasePeriodType
Under which class is "BasePeriodType" located? I'm trying to implement the following code:
Code:Tags: None
-
To the Support Staff
Actually, I do have a couple questions for you guys:
According to the help file, the "BarsPeriod" is only relevant for "Kagi, Line Break, P&F, and Renko Bars."
It also states that the property should not be accessed within the initialize() method.
The question is, what happens when it's accessed within initialize(), and why is this sort of thing only relevant for those 4 types of bars?
Thanks,
CG
Comment
-
Hi cgeorgan,
The BarsPeriod array is created in real time, so attempting to access it before bars are built cannot be done.
With NT7, the BasePeriodType is only available and supported for those listed at - http://www.ninjatrader.com/support/h...barsperiod.htm
Other bar types and custom bar types are are not relevant here because of the way they are calculated ad built.TimNinjaTrader Customer Service
Comment
-
I have been able to call BasePeriodType on initialization; though I've noticed all I get is "minute". It does not throw an exception - would it cause problems later in the operation of any strategy?Originally posted by NinjaTrader_Tim View PostHi cgeorgan,
The BarsPeriod array is created in real time, so attempting to access it before bars are built cannot be done.
With NT7, the BasePeriodType is only available and supported for those listed at - http://www.ninjatrader.com/support/h...barsperiod.htm
Other bar types and custom bar types are are not relevant here because of the way they are calculated ad built.
Comment
Latest Posts
Collapse
| Topics | Statistics | Last Post | ||
|---|---|---|---|---|
|
Started by Mindset, 04-21-2026, 06:46 AM
|
0 responses
108 views
0 likes
|
Last Post
by Mindset
04-21-2026, 06:46 AM
|
||
|
Started by M4ndoo, 04-20-2026, 05:21 PM
|
0 responses
154 views
0 likes
|
Last Post
by M4ndoo
04-20-2026, 05:21 PM
|
||
|
Started by M4ndoo, 04-19-2026, 05:54 PM
|
0 responses
72 views
0 likes
|
Last Post
by M4ndoo
04-19-2026, 05:54 PM
|
||
|
Started by cmoran13, 04-16-2026, 01:02 PM
|
0 responses
125 views
0 likes
|
Last Post
by cmoran13
04-16-2026, 01:02 PM
|
||
|
Started by PaulMohn, 04-10-2026, 11:11 AM
|
0 responses
79 views
0 likes
|
Last Post
by PaulMohn
04-10-2026, 11:11 AM
|

Comment