Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

how to determine bars since entry

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

    how to determine bars since entry

    i use 2 timeframes in my strategy
    • 5 minute
    • 30 minute

    i enter my orders using the 5 minute timeframe. when the order executes, i create stops using 30 minute timeframe.
    When i call BarsSinceEntryExecution in 30 minute timeframe, what timeframe would the function use to return the barcount since entry?

    #2
    Hello junkone, and thank you for your question.

    I am going to provide an excerpt from the help guide.

    Originally posted by http://ninjatrader.com/support/helpGuides/nt7/barssinceentry.htm
    The following method signature should be used when working with multi-time frame and instrument strategies:

    BarsSinceEntry(int barsInProgressIndex, string signalName, int entriesAgo)
    Therefore, if you use the 3 argument form, and you pass in a 0, you will get BarsSinceEntry with your 5 minute bars, and if you pass in a 1, you will get BarsSinceEntry from your 30 minute bars.

    Please let us know if there are any other ways we can help.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      when I am in my 5 minute timeframe, how can I find the currentbar id of the 30 minute timeframe?
      Last edited by junkone; 05-31-2016, 04:41 PM.

      Comment


        #4
        Originally posted by junkone View Post
        when I am in my 5 minute timeframe, how can I find the currentbar id of the 30 minute timeframe?
        ref: http://ninjatrader.com/support/helpG...urrentbars.htm

        Comment


          #5
          Hello junkone,

          As per the link that koganam posted, and remembering that 0 is the index of your 5 minute bars and 1 is the index of your 30 minute bars, you will want to use

          CurrentBars[1]
          Jessica P.NinjaTrader Customer Service

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by CaptainJack, 05-29-2026, 05:09 AM
          0 responses
          45 views
          0 likes
          Last Post CaptainJack  
          Started by CaptainJack, 05-29-2026, 12:02 AM
          0 responses
          30 views
          0 likes
          Last Post CaptainJack  
          Started by charlesugo_1, 05-26-2026, 05:03 PM
          0 responses
          99 views
          0 likes
          Last Post charlesugo_1  
          Started by DannyP96, 05-18-2026, 02:38 PM
          1 response
          177 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by CarlTrading, 05-11-2026, 05:56 AM
          0 responses
          170 views
          0 likes
          Last Post CarlTrading  
          Working...
          X