Announcement

Collapse
No announcement yet.

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!

      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...

          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.

                    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 Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      633 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      364 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      105 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      567 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      568 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X