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 philmg, Today, 12:55 PM
    0 responses
    1 view
    0 likes
    Last Post philmg
    by philmg
     
    Started by Russ Moreland, Today, 12:54 PM
    0 responses
    1 view
    0 likes
    Last Post Russ Moreland  
    Started by f.saeidi, Today, 12:14 PM
    2 responses
    5 views
    0 likes
    Last Post f.saeidi  
    Started by TradeForge, 04-19-2024, 02:09 AM
    2 responses
    28 views
    0 likes
    Last Post TradeForge  
    Started by aprilfool, 12-03-2022, 03:01 PM
    3 responses
    327 views
    0 likes
    Last Post NinjaTrader_Adrian  
    Working...
    X