Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Last Bar Not Charting

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

    Last Bar Not Charting

    I just noticed this tonight, but the last bar in the chart isn't being used.

    It appears to be for any indicator on my system...

    I put print statements in OnBarUpdate, and it's one short there too...

    I'm on latest public/stable NT

    I repaired DB, but nothing changed.

    Data is Yahoo historical...

    Am I overlooking something?

    View the attached screen shot for zoomed in reference...
    Attached Files

    #2
    Hello tazatek,

    Please set 'Calculate on bar close' to False for the indicators in question in the Indicator menu.

    The indicators will be calculated on each incoming tick, instead of the close of the bar.
    JasonNinjaTrader Customer Service

    Comment


      #3
      I guess I don't understand.

      I'm on HISTORICAL daily data ... well after end of day, so don't I want it to calculate on bar close?

      Could you explain a bit on how this works.

      From your docs it says this:
      Calculate on bar close -- If true, will only calculate the strategy's value on the close of a bar else its calculated with each incoming tick
      since I have daily historical data, I want it to calculate on bar close. so why would I need to set it to false?

      Comment


        #4
        Hello Matthew,

        If 'Calculate on bar close' is set to True, the indicator/strategy will calculate its value/conditions at the close of the current bar.

        As per the screenshot in post #1, you see that the indicators do not plot a value for the current bar.

        This is because 'Calculate on bar close' is set to True for the indicators in question.

        Set it to False and the indicators will display a value for the most current price bar.
        JasonNinjaTrader Customer Service

        Comment


          #5
          I was viewing this screen capture on the 18th of November, with data up to the 17th.

          The day had closed for the 17th, but is only showing plots up to the 16th.

          Has the 17th not closed in some way?

          I consider the 17th to be a closed bar, and should have the setting set to 'true' because of this.

          How am I missing that the 17th bar is still open? The day is well over.

          ???

          Comment


            #6
            Unfortunately it will plot the indicator values when the 18th bar is created.
            JasonNinjaTrader Customer Service

            Comment


              #7
              This is a function like FirstTickOfBar which signals the close of the last bar and calculations of the indicators at that point, correct? This might help you understand what is happening. I guess NT has no way to know the bar is closed until the next one is started even though it is a daily bar and the day is over.
              eDanny
              NinjaTrader Ecosystem Vendor - Integrity Traders

              Comment


                #8
                eDanny -

                That might be the problem... that NT doesn't really know that the day is over, until a new one starts.

                NT Team: Is this correct?

                ie - if I have 100 bars of historical data, only 99 are considered closed bars, because there isn't a 101st bar to tell me that bar 100 is closed?

                Comment


                  #9
                  Hi tazatek,

                  Thank you for your reply.

                  That is correct.
                  KyleNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by alifarahani, Today, 09:40 AM
                  6 responses
                  28 views
                  0 likes
                  Last Post alifarahani  
                  Started by Waxavi, Today, 02:10 AM
                  1 response
                  17 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by Kaledus, Today, 01:29 PM
                  5 responses
                  13 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Started by Waxavi, Today, 02:00 AM
                  1 response
                  12 views
                  0 likes
                  Last Post NinjaTrader_LuisH  
                  Started by gentlebenthebear, Today, 01:30 AM
                  3 responses
                  17 views
                  0 likes
                  Last Post NinjaTrader_Jesse  
                  Working...
                  X