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 Lumbeezl, 01-11-2022, 06:50 PM
          31 responses
          817 views
          1 like
          Last Post NinjaTrader_Adrian  
          Started by xiinteractive, 04-09-2024, 08:08 AM
          5 responses
          14 views
          0 likes
          Last Post NinjaTrader_Erick  
          Started by swestendorf, Today, 11:14 AM
          2 responses
          6 views
          0 likes
          Last Post NinjaTrader_Kimberly  
          Started by Mupulen, Today, 11:26 AM
          0 responses
          7 views
          0 likes
          Last Post Mupulen
          by Mupulen
           
          Started by Sparkyboy, Today, 10:57 AM
          1 response
          6 views
          0 likes
          Last Post NinjaTrader_Jesse  
          Working...
          X