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 CarlTrading, 03-31-2026, 09:41 PM
|
1 response
39 views
0 likes
|
Last Post
|
||
|
Started by CarlTrading, 04-01-2026, 02:41 AM
|
0 responses
18 views
0 likes
|
Last Post
by CarlTrading
04-01-2026, 02:41 AM
|
||
|
Started by CaptainJack, 03-31-2026, 11:44 PM
|
0 responses
25 views
1 like
|
Last Post
by CaptainJack
03-31-2026, 11:44 PM
|
||
|
Started by CarlTrading, 03-30-2026, 11:51 AM
|
0 responses
41 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:51 AM
|
||
|
Started by CarlTrading, 03-30-2026, 11:48 AM
|
0 responses
34 views
0 likes
|
Last Post
by CarlTrading
03-30-2026, 11:48 AM
|

Comment