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 CarlTrading, 03-31-2026, 09:41 PM
          1 response
          67 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 04-01-2026, 02:41 AM
          0 responses
          36 views
          0 likes
          Last Post CarlTrading  
          Started by CaptainJack, 03-31-2026, 11:44 PM
          0 responses
          59 views
          1 like
          Last Post CaptainJack  
          Started by CarlTrading, 03-30-2026, 11:51 AM
          0 responses
          62 views
          0 likes
          Last Post CarlTrading  
          Started by CarlTrading, 03-30-2026, 11:48 AM
          0 responses
          53 views
          0 likes
          Last Post CarlTrading  
          Working...
          X