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 helpwanted, Today, 03:06 AM
              1 response
              5 views
              0 likes
              Last Post sarafuenonly123  
              Started by Brevo, Today, 01:45 AM
              0 responses
              7 views
              0 likes
              Last Post Brevo
              by Brevo
               
              Started by aussugardefender, Today, 01:07 AM
              0 responses
              5 views
              0 likes
              Last Post aussugardefender  
              Started by pvincent, 06-23-2022, 12:53 PM
              14 responses
              242 views
              0 likes
              Last Post Nyman
              by Nyman
               
              Started by TraderG23, 12-08-2023, 07:56 AM
              9 responses
              384 views
              1 like
              Last Post Gavini
              by Gavini
               
              Working...
              X