Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Close[260] doesn't work

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

    Close[260] doesn't work

    Hello,
    I need a closing price of 260 bars ago. But it doesn't work and the strategy doesn't generate anything if I use more than 55 bars.

    for example
    Code:
    Print(Close[260]);
    is there a maximum limit of readable bars?

    #2
    xmms1, what is your min. bars required setting if you startup the strategy?

    Comment


      #3
      I didn't use this:

      Code:
      if (CurrentBar < 260) return;
      within OnBarUpdate() method.

      I fixed it and now it works. Is this the reason why it didn't work? And why the strategy generated nothing?

      Comment


        #4
        Yup. You can usually see mentions of this error in the Control Center log.
        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
        646 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        367 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        107 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        569 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        573 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X