Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

Partner 728x90

Collapse

Possible Bug See Attached

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

    Possible Bug See Attached

    NT v. 7.0.1000.4

    Trying to debug an indicator I am working on, I ran into this behavior which I believe is not correct.

    The index [0] is referencing what should be index[1] in all dataseries. I made a test indicator attached that just plots the close, but has High[0], Low[0] drawn on bottom, and High[1], Low[1] draw on the top......

    The databox in the attached screenshot is showing that the High[0] should be returning 1319.45, instead High[0] returns 1319.74.... all other index references are shifted one bar to the left of where they should be, and I have no access to index[0], the CurrentBar's values.

    Do you get the same behavior. Data is fresh DL from Kinetick, Switching the Session Template to 24/7 from Default makes no difference.

    Is this a Bug?
    Is there a known Bug list?

    It does this on all my charts.... and has burned some debug time when I kept checking calcs I was making on the bar [0] that were not coming out correctly....
    Attached Files
    Last edited by Crassius; 03-29-2011, 05:23 PM.

    #2
    Crassius, in which timezone are you working / is your PC setup? If you would like to refer to the last values you need to work with CalculateOnBarClose = false for your script, otherwise it uses the last completed bar's values.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      I am on EST.

      Now that the market is open, if I check an active updating tick chart, I get what I expect. The bar in progress is ignored of course, and the first completed bar, second to the left from the right of the chart is acted upon within CalculateOnBarClose = true;

      The last post's screenshot I attached is daily data, after the market closed.... so the right-most bar had already closed... as the data box shows.

      Also I thought it might have something to do with time.... so I switched the session template to 24/7.... that's the last post's screenshot still ignoring the right-most bar.

      I have attached a screenshot I just took.... on 3/30/2011, without updating the chart from the server since yesterday, with the Historical data manager window open showing the last bar (3/29/2011) has a closed value of 1319.44, yet the indicator returns only the closed value from the bar of 3/28/2011 of 1319.74.
      Attached Files
      Last edited by Crassius; 03-30-2011, 06:54 AM.

      Comment


        #4
        Crassius, thanks - on the daily bar please try CalculateOnBarClose = false and recheck - as NT is event (not time!) based the daily bar is considered closed when the open tick of the new bar has arrived - until then it's still 'in progress'.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          "as NT is event (not time!) based the daily bar is considered closed when the open tick of the new bar has arrived - until then it's still 'in progress'.

          That is exactly what was happening.

          Thanks for the help... learned something new

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by FrazMann, Today, 11:21 AM
          0 responses
          3 views
          0 likes
          Last Post FrazMann  
          Started by geddyisodin, Yesterday, 05:20 AM
          8 responses
          51 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by cmtjoancolmenero, Yesterday, 03:58 PM
          10 responses
          36 views
          0 likes
          Last Post NinjaTrader_ChelseaB  
          Started by DayTradingDEMON, Today, 09:28 AM
          4 responses
          24 views
          0 likes
          Last Post DayTradingDEMON  
          Started by George21, Today, 10:07 AM
          1 response
          19 views
          0 likes
          Last Post NinjaTrader_ChristopherJ  
          Working...
          X