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 charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      51 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      142 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      160 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      96 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      275 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X