Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Last bar in other time frame

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

    Last bar in other time frame

    Is there a way to check the last bar of 5 minute time frame while the indicator run in 1 minute time frame?

    #2
    Hello edward_bell,

    Thanks for your post.

    Can you provide more context to your question as there is not enough info to assist with? Can you further describe what you are trying to do?

    Is the question pertaining to an indicator or strategy script? If so have you added the 5 minute data series to it?
    Paul H.NinjaTrader Customer Service

    Comment


      #3
      It is an indicator running on 1 minute chart and I already added the 5 minute time frame in the Initialize section. I just want to know if the bar is the last close historical bar in 5 minute chart.

      Comment


        #4
        Hello edward_bell,

        Thanks for your reply.

        Assuming that the 5 minute data series is the only added data series. If you are running with CalculateOnbarClose = true then you can refer to the close of the last historical bar with Closes[1][0] where 1 refers to the 5 minute added data series and [0] refers to the last completed 5 minute bar.

        If you are using CalculateOnBarClose = false, and connected to live or replay data, then use Closes[1][1] where the first 1 refers to the 5 minute data series and the second 1 will refer to the last completed bar of the 5 minute data series. Note that in this case Closes[1][0] would refers to the currently forming 5 minute bar.

        For a complete understanding please review: http://ninjatrader.com/support/helpG...nstruments.htm in particular the section " How Bar Data is Referenced " for a good illustration of the differences.
        Paul H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by blar58, Today, 03:16 PM
        1 response
        5 views
        0 likes
        Last Post NinjaTrader_Melissa  
        Started by alcorr247, Today, 02:52 PM
        1 response
        7 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by Radano, Today, 02:30 PM
        1 response
        4 views
        0 likes
        Last Post NinjaTrader_ChrisL  
        Started by DrummerBoy, Today, 01:34 PM
        3 responses
        29 views
        0 likes
        Last Post NinjaTrader_Clayton  
        Started by kangethe, Today, 02:11 PM
        1 response
        11 views
        0 likes
        Last Post NinjaTrader_BrandonH  
        Working...
        X