• If this is your first visit, you will have to register before you can post. To view messages, please scroll below and select the forum that you would like to visits. Questions? Be sure to check out the Forum FAQ.

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
    Patrick H.NinjaTrader Customer Service

    Comment

    Latest Posts

    Collapse

    Topics Statistics Last Post
    Started by kudos, Today, 07:22 AM
    1 response
    7 views
    0 likes
    Last Post NinjaTrader_ChelseaB  
    Started by U0000999, Yesterday, 07:54 PM
    2 responses
    12 views
    0 likes
    Last Post U0000999  
    Started by Sulfred, Yesterday, 08:34 PM
    2 responses
    16 views
    0 likes
    Last Post Sulfred
    by Sulfred
     
    Started by MercuryRed, Yesterday, 03:24 PM
    1 response
    17 views
    0 likes
    Last Post NinjaTrader_PaulH  
    Started by Anonytrade, Today, 05:18 AM
    1 response
    9 views
    0 likes
    Last Post NinjaTrader_Marco  
    Working...
    X