Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Question about PeriodType

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

    Question about PeriodType

    Hello.

    I have a chart using a custom PeriodType of "BWT Renko".

    I'm working on creating a strategy, but the following line is being rejected by compiler.

    Add(PeriodType.BWTRenko, 12);

    I'm getting, "NinjaTrader.Data.PeriodType' does not contain a definition for 'BWTRenko'"

    Is there a way of defining the BWTRenko type to the compiler?

    Why does NT recognize the type for building a chart, but not for the Add(PeriodType.xx) statement?

    Regards,
    R. C.

    #2
    RC,

    PeriodType is an enumeration defined in the NTCore, so you can't just enter a type like that unless it is defined in the enum. However, PeriodType does allow for 10 custom types (Custom0 - Custom9), but you'll need to know which one it is. If you have access to the code you should be able to find it in there.

    VT

    Comment


      #3
      VT, thanks for the reply.

      If I'm understanding you correctly, you are saying that one of the CustomX Period Types is associated with the BWT Renko.

      If that is so, then I need some direction. Specifically how do I determine what PeriodTypes are associated with Custom0, ..., Custom9?

      Comment


        #4
        Do you have the source code for the BWTRenko? If so, you can open it in the editor and use the "find" feature (binoculars) and search the file for the word " custom ", and see if you can find it in there.

        That would be a place to start anyway. If you don't have access to the code, then maybe just try the different CustomX types and see if one works. Intellisense should prompt you when you type
        "Add(PeriodType." it should popup a little window showing you the enumeration.

        I have not tried using custom PeriodTypes before, so I'm just going by what I would do.

        VT

        Comment


          #5
          VT.

          I see it now. In the BWTRenko.cs, I see public BWTRenkoBarsType() : base(PeriodType.Final3) {}. So, its "Final3".

          I will try that and thanks for your help.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          651 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          370 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          109 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          574 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          577 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X