Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bars Array

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

    Bars Array

    Add(PeriodType.Minute, 5);

    If I wanted to refer to the Low[1] off the 5 minute chart how would I need to write the Low[1]

    Also is I want to refer to 5 x 5 minute bars below how would this need to be written

    Bars.BarsSinceSession>=5

    #2
    fiddy, this info would be accessible via Lows - http://www.ninjatrader.com/support/h...s/nt7/lows.htm

    Would do you want to compare the 5 min bars to for your second condition? You would want to see 5 bars from the start the of the session given by the added 5 min chart?

    Comment


      #3
      thanks for Low suggestion

      Re: Bars.BarsSinceSession>=5

      I would like there to 5 x 5 min bars certain criteria is assessed

      Comment


        #4
        fiddy, both CurrentBars[x] as well as Bars.BarsSinceSession would work in the called BarsInProgress context, meaning you can get a count based off the primary or secondary series and check how many bars have for example passed to validate / invalidate a setup.

        Comment


          #5
          How do u refer to the second array using Bars.BarsSinceSession

          Comment


            #6
            You would just call it in BarsInProgress == 1.

            Comment


              #7
              How do you refer to the second array for Close[0]

              I would like to refer to the close if the 1 minute bars

              Add(PeriodType.Minute, 1);

              Close[0] - 100 * TickSize > longExitStopOrder.StopPrice

              Comment


                #8
                Just use the Closes then with your desired bars array object specified - https://www.ninjatrader.com/support/...nt7/closes.htm

                Comment


                  #9
                  Would this coding work, as it doesn't seem to be, can this function only be used in the primary index?
                  Position.GetProfitLoss(Closes[1][0], PerformanceUnit.Points)

                  Comment


                    #10
                    Would expect it to work in any index, the double price you pass in is just used as comparison to compute against, if you pass in the added series close price and also calculate in this added series context it should report as expected.

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by argusthome, Yesterday, 10:06 AM
                    0 responses
                    14 views
                    0 likes
                    Last Post argusthome  
                    Started by NabilKhattabi, 03-06-2026, 11:18 AM
                    0 responses
                    11 views
                    0 likes
                    Last Post NabilKhattabi  
                    Started by Deep42, 03-06-2026, 12:28 AM
                    0 responses
                    9 views
                    0 likes
                    Last Post Deep42
                    by Deep42
                     
                    Started by TheRealMorford, 03-05-2026, 06:15 PM
                    0 responses
                    4 views
                    0 likes
                    Last Post TheRealMorford  
                    Started by Mindset, 02-28-2026, 06:16 AM
                    0 responses
                    31 views
                    0 likes
                    Last Post Mindset
                    by Mindset
                     
                    Working...
                    X