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

Adding A Custom Bar Type To Multi Instrument Strategy

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

    Adding A Custom Bar Type To Multi Instrument Strategy

    Have a strategy that uses different time frames of a custom bar type. Would like to know how to add the additional time frame bar types to the strategy.

    If is wasnt a custom bar type I could use something like AddRenko("NQ 9-17",18, MarketDataType.Last);

    But not sure how to get a custom bar type instead of just the regular Renko

    #2
    Hello akonkol2,

    From the help guide in the Tips section:

    "You can add a custom BarsType which is installed on your system by casting the registered enum value for that BarsPeriodType. For example: AddDataSeries((BarsPeriodType)14, 10);"

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Where can the registered enum value be found?

      Comment


        #4
        Hello,

        Thank you for the post.

        Generally, you could look in the BarsType syntax for this value, but if this is a third party item you may not be able to see it.

        You can use the following indicator on a chart with the Output Window open to see all the types listed with their ID.




        Additionally for NT7 Add syntax, please see the following document:




        I look forward to being of further assistance.
        Last edited by NinjaTrader_Jesse; 07-21-2017, 09:43 AM. Reason: Updated for correct version\
        JesseNinjaTrader Customer Service

        Comment


          #5
          Is there a version for NT 7? Trying to load gives error on NT7

          Comment


            #6
            Hello,

            That was my mistake, the link has been updated to the correct version.

            Please let me know if I may be of further assistance.
            JesseNinjaTrader Customer Service

            Comment


              #7
              TY That one loaded but the output doesnt show the enum value. This is copied from the output window

              Custom4 BetterRenko
              Custom0 Minute
              Custom1 Minute
              Custom2 Minute
              Custom3 Minute
              Custom5 Minute
              Custom6 Minute
              Custom7 Minute
              Custom8 Minute
              Custom9 Minute
              Final0 Minute
              Final1 Minute
              Final2 Minute
              Final3 Minute
              Final4 Minute

              Comment


                #8
                Hello,

                This is correct, for NT7 you would need to use the Add syntax rather than what was provided in post 2. The help guide shows the Add syntax, you would replace the PeriodType in the example with the one you want that was listed from your output.

                If you wanted the renko that is listed in your output, that would be PeriodType.Custom4

                Please let me know if I may be of further assistance.
                JesseNinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by alifarahani, Today, 09:40 AM
                6 responses
                26 views
                0 likes
                Last Post alifarahani  
                Started by Waxavi, Today, 02:10 AM
                1 response
                17 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by Kaledus, Today, 01:29 PM
                5 responses
                13 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Started by Waxavi, Today, 02:00 AM
                1 response
                12 views
                0 likes
                Last Post NinjaTrader_LuisH  
                Started by gentlebenthebear, Today, 01:30 AM
                3 responses
                17 views
                0 likes
                Last Post NinjaTrader_Jesse  
                Working...
                X