Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsType inheritance not supported completely?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    BarsType inheritance not supported completely?

    I've developed a custom BarType based on MinuteBarsType:
    Code:
    public class MyMinuteBarsType : MinuteBarsType
    . However, there is no way to utilize the custom PeriodType registration for example:
    Code:
    public MyMinuteBarsType() : base(PeriodType.Custom2)
    You get the error
    'NinjaTrader.Data.MinuteBarsType' does not contain a constructor the takes '1' arguments
    If I use BarTypes as the base for my inheritance, then indicators, such as BarTimer don't see my bar type a a Minute type bar. BarTimer fails to recognize the BarTypes derived class as a minute type:
    Code:
    if (Bars.Period.Id == PeriodType.Minute || Bars.Period.Id == PeriodType.Second)
    even tho the BarTypes derived class uses
    Code:
            public override PeriodType BuiltFrom
            {
                get { return PeriodType.Minute; }
            }
    So I'm stuck between a rock and a hard place. If I derive from BarsType, I can't be seen as a MinuteBarsType. If I derive from MinuteBarsType, I can't "register" as a custom PeriodType.

    Am I missing something?

    #2
    Hello TiggerTrader,

    Thank you for your post.

    Unfortunately, custom bar types are unsupported in NinjaTrader 7. Custom bar types will be supported in NinjaTrader 8. You can find the list of major enhancements at the following link: http://www.ninjatrader.com/downloads...njaTrader8.pdf

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by argusthome, 03-08-2026, 10:06 AM
    0 responses
    79 views
    0 likes
    Last Post argusthome  
    Started by NabilKhattabi, 03-06-2026, 11:18 AM
    0 responses
    45 views
    0 likes
    Last Post NabilKhattabi  
    Started by Deep42, 03-06-2026, 12:28 AM
    0 responses
    29 views
    0 likes
    Last Post Deep42
    by Deep42
     
    Started by TheRealMorford, 03-05-2026, 06:15 PM
    0 responses
    32 views
    0 likes
    Last Post TheRealMorford  
    Started by Mindset, 02-28-2026, 06:16 AM
    0 responses
    66 views
    0 likes
    Last Post Mindset
    by Mindset
     
    Working...
    X