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

Accessing Custom Bar Type From Ninja Script Code

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

    Accessing Custom Bar Type From Ninja Script Code

    I want to use a custom bar type from within a ninja script program.

    The custom bar type is accessible when I create a chart in the main NT console. However, when I try to access it from within my code (using Add(PeriodType....)) there is no option to select it.

    What am I doing wrong?

    Thanks

    #2
    Hello x703jko,

    Thanks for your post.

    Please see the responses to this thread: http://ninjatrader.com/support/forum...ad.php?t=45587
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      Got. Solved the conundrum. Thanks!

      Comment


        #4
        Still not sure what to do. For a custom bar type, how do I specify the parameters required by the bar type when I use the "Add" statement in my NinjaScript code.

        Comment


          #5
          Hello x703jko,

          Thanks for your post.

          In this example: Add(PeriodType.Custom0, 1); 1 is the parameter.
          Paul H.NinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Paul View Post
            Hello x703jko,

            Thanks for your post.

            In this example: Add(PeriodType.Custom0, 1); 1 is the parameter.
            How many parameters can the Add command take? I'm using a Period Type that requires three parameters.

            Comment


              #7
              Hello x703jko,

              Thanks for your reply.

              The Add statement only permits the one parameter.

              If the custom bar is the unirenko type, that custom bar type permits the 1 parameter to represent all 3 of the bar specifiers. For example Add(PeriodType.Custom5, 001019009); would pass to the unirenko bar type the parameter where 001 = step size, 019 = reversal bar size and 009 is the body size.

              I do know the bar code for the unirenko bar type does permit parsing in such a parameter. I cannot advise of other custom bar types.
              Paul H.NinjaTrader Customer Service

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by CortexZenUSA, Today, 12:53 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by CortexZenUSA, Today, 12:46 AM
              0 responses
              1 view
              0 likes
              Last Post CortexZenUSA  
              Started by usazencortex, Today, 12:43 AM
              0 responses
              5 views
              0 likes
              Last Post usazencortex  
              Started by sidlercom80, 10-28-2023, 08:49 AM
              168 responses
              2,265 views
              0 likes
              Last Post sidlercom80  
              Started by Barry Milan, Yesterday, 10:35 PM
              3 responses
              11 views
              0 likes
              Last Post NinjaTrader_Manfred  
              Working...
              X