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