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 zstheorist, Today, 07:52 PM
          0 responses
          3 views
          0 likes
          Last Post zstheorist  
          Started by pmachiraju, 11-01-2023, 04:46 AM
          8 responses
          149 views
          0 likes
          Last Post rehmans
          by rehmans
           
          Started by mattbsea, Today, 05:44 PM
          0 responses
          5 views
          0 likes
          Last Post mattbsea  
          Started by RideMe, 04-07-2024, 04:54 PM
          6 responses
          33 views
          0 likes
          Last Post RideMe
          by RideMe
           
          Started by tkaboris, Today, 05:13 PM
          0 responses
          5 views
          0 likes
          Last Post tkaboris  
          Working...
          X