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 AaronKoRn, Yesterday, 09:49 PM
          0 responses
          11 views
          0 likes
          Last Post AaronKoRn  
          Started by carnitron, Yesterday, 08:42 PM
          0 responses
          10 views
          0 likes
          Last Post carnitron  
          Started by strategist007, Yesterday, 07:51 PM
          0 responses
          12 views
          0 likes
          Last Post strategist007  
          Started by StockTrader88, 03-06-2021, 08:58 AM
          44 responses
          3,982 views
          3 likes
          Last Post jhudas88  
          Started by rbeckmann05, Yesterday, 06:48 PM
          0 responses
          10 views
          0 likes
          Last Post rbeckmann05  
          Working...
          X