Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 geddyisodin, Yesterday, 05:20 AM
          8 responses
          49 views
          0 likes
          Last Post geddyisodin  
          Started by DayTradingDEMON, Today, 09:28 AM
          3 responses
          19 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by Stanfillirenfro, Today, 07:23 AM
          9 responses
          23 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by George21, Today, 10:07 AM
          0 responses
          8 views
          0 likes
          Last Post George21  
          Started by navyguy06, Today, 09:28 AM
          1 response
          7 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Working...
          X