Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

BarsSinceEntry - int entriesAgo

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

    BarsSinceEntry - int entriesAgo

    Can I please get clarification on how this works in a multi time frame strategy? The help guide states the following:

    The following method signature should be used when working with multi-time frame and instrument strategies:

    BarsSinceEntry(int barsInProgressIndex, string signalName, int entriesAgo)

    signalName - The signal name of an entry order specified in an order entry method. Pass in empty string "" for default signal.
    barsInProgressIndex - The index of the Bars object the entry order was submitted against. See the BarsInProgress property.
    entriesAgo - Number of entries ago. Pass in 0 for the number of bars since the last entry.

    My confusion comes from the last parameter, entriesAgo. It states to pass in 0 for the number of bars since the last entry. I am entering a trade in the secondary time frame off of signals in the primary time frame. So when I call BarsSinceEntry I use BarsSinceEntry(1, "ShortEntry", 0) but when I call this I do not know how many bars have passed. I guess I am just asking to clarify what should go into the entriesAgo parameter. I do not call BarsSinceEnty immediately but more likely after a number of bars have passed or not at all in some trades. Thanks!

    GT

    #2
    It is not the number of bars passed. It is the number of entries ago. Thank you for pointing out the typo.

    0 means latest trade. 1 means prior trade. etc.
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Thanks for the response. I was hoping it meant something else so maybe that could be my fix. On to try something else. Thank!

      GT

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
      0 responses
      656 views
      0 likes
      Last Post Geovanny Suaza  
      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
      0 responses
      370 views
      1 like
      Last Post Geovanny Suaza  
      Started by Mindset, 02-09-2026, 11:44 AM
      0 responses
      109 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
      0 responses
      574 views
      1 like
      Last Post Geovanny Suaza  
      Started by RFrosty, 01-28-2026, 06:49 PM
      0 responses
      577 views
      1 like
      Last Post RFrosty
      by RFrosty
       
      Working...
      X