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

BarsPeriod

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

    BarsPeriod

    Can you use this in Indicator Or one that works in indicator?

    I get the following message when I use
    if (BarsPeriod.Id == PeriodType.Volume) {

    The error message

    'The name 'BarsPeriod' does not exist int the current context

    #2
    The correct syntax is:

    Bars.Period.Id

    Regards
    Ralph

    Comment


      #3
      Thanks Ralph, you are correct!
      BertrandNinjaTrader Customer Service

      Comment


        #4
        Would you be able to point me to the reference for 'Bars'? Thanks.


        I can also see BarsPeriod in the manual. What is the different between Bars.Period and BarsPeriod?

        Comment


          #5
          Hi xewoox, please check this link - http://www.ninjatrader-support.com/H...V6/Period.html

          The 'BarsPeriod' is recommend for usage in stratgies...

          BertrandNinjaTrader Customer Service

          Comment


            #6
            Originally posted by NinjaTrader_Bertrand View Post
            Hi xewoox, please check this link - http://www.ninjatrader-support.com/H...V6/Period.html

            The 'BarsPeriod' is recommend for usage in stratgies...

            http://www.ninjatrader-support.com/H...arsPeriod.html
            Thanks for the information. Is there any good starting point talking the architecture of Ninja Trader and what are all the pre-defined objects and their purpose.

            Comment


              #7
              xewoox,

              The information in the Help Guide is pretty extensive. That is the resource we generally link people to.
              Josh P.NinjaTrader Customer Service

              Comment


                #8
                Originally posted by NinjaTrader_Josh View Post
                ...The information in the Help Guide is pretty extensive. That is the resource we generally link people to.
                ... and what helped me personally a lot at the beginning is the Reference Samples section. Nothing is more informative than good examples.

                Regards
                Ralph

                Comment


                  #9
                  Yes. I agree the information is extensive and is a good reference if you know where they are, I am looking for an entry point to understand Ninja Trader and know how to get start. I went through all your tutorial, but yet I never discover the 'Bars' object and know what it is used for. But is that a specific section that gives us a overall review of all the pre-existing objects. For example, Bars or Period. How are they related to scripting? I am looking for a summary of the overall architecture of objects exist in Ninja Trader.

                  Comment


                    #10
                    You might want to check into the NinjaScript Language reference in the help guide. You can find it under NinjaScript > NinjaScript Language Reference.
                    BertrandNinjaTrader Customer Service

                    Comment


                      #11
                      When I started off all I did was open up the Help Guide and go to the Index page. From there I just clicked on every single one and read a little bit about each one to get a feel for and see what was available. Then I proceeded to try different ideas and when you think of something that you might need you go back and check the Help Guide because you remember reading something about it before.
                      Josh P.NinjaTrader Customer Service

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by judysamnt7, 03-13-2023, 09:11 AM
                      4 responses
                      53 views
                      0 likes
                      Last Post DynamicTest  
                      Started by ScottWalsh, Today, 06:52 PM
                      4 responses
                      33 views
                      0 likes
                      Last Post ScottWalsh  
                      Started by olisav57, Today, 07:39 PM
                      0 responses
                      5 views
                      0 likes
                      Last Post olisav57  
                      Started by trilliantrader, Today, 03:01 PM
                      2 responses
                      19 views
                      0 likes
                      Last Post helpwanted  
                      Started by cre8able, Today, 07:24 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post cre8able  
                      Working...
                      X