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 funk10101, Yesterday, 09:43 PM
    1 response
    13 views
    0 likes
    Last Post NinjaTrader_Gaby  
    Started by TheWhiteDragon, 01-21-2019, 12:44 PM
    5 responses
    551 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by rtwave, 04-12-2024, 09:30 AM
    5 responses
    37 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by funk10101, Today, 12:02 AM
    1 response
    11 views
    0 likes
    Last Post NinjaTrader_LuisH  
    Started by GLFX005, Today, 03:23 AM
    1 response
    6 views
    0 likes
    Last Post NinjaTrader_Erick  
    Working...
    X