Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT VolumeUpDown error? Strange.

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

    NT VolumeUpDown error? Strange.

    Multiple times today, I lost the Plot display on the unadorned VolumeUpDown() indicator, so naturally, each time, I went looking in the log, before hitting F5. Much to my surprise, I saw this:

    9/4/2012 10:57:49 AM|3|4|Error on plotting values to chart data box for indicator 'VolumeUpDown'. Please check the 'OnBarUpdate' method: Object reference not set to an instance of an object.
    ...
    9/4/2012 1:06:59 PM|3|4|Error on plotting values to chart data box for indicator 'VolumeUpDown'. Please check the 'OnBarUpdate' method: Object reference not set to an instance of an object.
    ...
    9/4/2012 2:38:55 PM|3|4|Error on plotting values to chart data box for indicator 'VolumeUpDown'. Please check the 'OnBarUpdate' method: Object reference not set to an instance of an object.
    ...
    Now this is the unmodified, as shipped, indicator from NT. I promise most solemnly that I have not modified it in any way, despite sore temptation to do so.

    Even if this had happened once, I would have been surprised, but multiple times? When I look in the indicator, it is actually setting the Plots using the Values collection, so it is not even as if a named Plot went bye-bye in memory.

    Have I really found a bug? Yes, it happened before today, but this is the first that I am reporting it. I still have the logs/trace files from instances when it happened before today as well.

    Just in case you want to examine my actual environment, as it exists, I have not even shut down my trading station yet. You can see it as it was during the day. Of course, the Plots now display, as I hit the F5 so that I could see what was going on with the dang volume.

    You are welcome to remote in if you wish.

    #2
    Hello koganam,

    Thank you for reporting.

    We have seen similar instances from this particular indicator and it is on our developments list to review for the next major release of NinjaTrader.
    MatthewNinjaTrader Product Management

    Comment


      #3
      I also have a problem with a custom indicator, which is used by an automated strategy,
      The strategy disconnects when live with the following error:

      Error on plotting values to chart data box for indicator 'xxx'. Please check the 'OnBarUpdate' method: The object reference is not set to an instance of an object.

      The indicator is a multi-timeframe indicator, which only has two small arrays which have been properly initialized. The indicator has no custom plot that override the default plot. The bug is quite annoying, because the automated strategy stops in the middle of the day.

      Could you please elaborate on the possible causes, or how this could be avoided. The bug cannot be easily reproduced, but was reported by several customers.
      Last edited by Harry; 09-22-2012, 04:00 AM.

      Comment


        #4
        Originally posted by Harry View Post
        I also have a problem with a custom indicator, which is used by an automated strategy,
        The strategy disconnects when live with the following error:

        Error on plotting values to chart data box for indicator 'xxx'. Please check the 'OnBarUpdate' method: The object reference is not set to an instance of an object.

        The indicator is a multi-timeframe indicator, which only has two small arrays which have been properly initialized. The indicator has no custom plot that override the default plot. The bug is quite annoying, because the automated strategy stops in the middle of the day.

        Could you please elaborate on the possible causes, or how this could be avoided. The bug cannot be easily reproduced, but was reported by several customers.
        I am beginning to suspect that objects are being erroneously marked for garbage collection. You may have to enable some debugging to enable you to know which object it is in your code, so that your customers can send you the output to pinpoint which object it is, then you may have to do a null reference check on that object and reinitialize it as necessary.

        A bad kludge, but we cannot let our customers be getting errors that stop them cold, or we shall lose them. I know they do not want to hear that it is the NT framework that is the issue. They bought our code, and expect it to work. (And truth to tell, while I think NT is a considerably well-running framework, given its size and complexity, while running as an extension to another framework, this is a nasty bug, if such it is).

        Comment


          #5
          Originally posted by koganam View Post
          I am beginning to suspect that objects are being erroneously marked for garbage collection. You may have to enable some debugging to enable you to know which object it is in your code, so that your customers can send you the output to pinpoint which object it is, then you may have to do a null reference check on that object and reinitialize it as necessary.

          A bad kludge, but we cannot let our customers be getting errors that stop them cold, or we shall lose them. I know they do not want to hear that it is the NT framework that is the issue. They bought our code, and expect it to work. (And truth to tell, while I think NT is a considerably well-running framework, given its size and complexity, while running as an extension to another framework, this is a nasty bug, if such it is).
          The problem seems to is linked to the data box, you are just not allowed to open the data box, while the strategy is running. I had one case confirmed where the same strategy was running on two PCs live at the same time. One had the data box open, the other one did not. The indicator stopped working on the PC with the data box, but not on the other one.

          If the problem occurs on the VolUpDown indicator, which object would you reinitialize for a null reference check? There are next to no objects that are likely candidates.

          A null reference could also occur if the access to the object is not properly synchronized, for example if plot and data box try to access an object at the same time.
          Last edited by Harry; 09-22-2012, 10:17 AM.

          Comment


            #6
            Harry,

            In your indicator do you also use .Reset() on a data series?

            -Brett

            Comment


              #7
              Originally posted by NinjaTrader_Brett View Post
              Harry,

              In your indicator do you also use .Reset() on a data series?

              -Brett
              Yes, the indicator uses Reset(). What the indicator does is plotting channels. Depending on market conditions there can be no channels, when volatility is low. In that case I use Reset(), as I do not want to plot the channels.

              Comment


                #8
                Thanks, I want to keep the two cases separate if possible as they may be the same issue but again may not be. Harry, I might have you send in your code to support at ninjatrader dot com ATT:N Brett .if you have time please.

                Koganam,

                As far as the VolumeUpDown, is this being run COBC = true or false?

                Are you referencing it from any other strategies or indicators?

                What chart type are you running this on when it errored?

                Are you using Mini DataBox or DataBox?

                Are you using Global Cross Hair?

                When this happened do you remember what you were doing with the mouse?

                -Brett

                Comment


                  #9
                  Koganam,

                  As far as the VolumeUpDown, is this being run COBC = true or false? - false.

                  Are you referencing it from any other strategies or indicators? - No. It is the only copy running, stand alone.

                  What chart type are you running this on when it errored? - 5 Range on the /TF.

                  Are you using Mini DataBox or DataBox? - Neither. there is no databox open.

                  Are you using Global Cross Hair? - No. Just the standard crosshair.

                  When this happened do you remember what you were doing with the mouse? - Nothing. I was waiting for my exit to be hit (target or stop loss), then the Plot display suddenly disappeared. My mouse was still; when I am waiting to exit, I do NOTHING, just sit and wait.

                  Comment


                    #10
                    Hi Brett,

                    I could not so far reproduce the error on my own machine. My customer confirmed that the data box was open when the indicator stopped working. The second machine which ran the same charts and did not fail had no data box open. I will first have to reproduce the problem on my side, for which I will need to run tests with the data box open.

                    Originally posted by NinjaTrader_Brett View Post
                    Thanks, I want to keep the two cases separate if possible as they may be the same issue but again may not be. Harry, I might have you send in your code to support at ninjatrader dot com ATT:N Brett .if you have time please.

                    Koganam,

                    As far as the VolumeUpDown, is this being run COBC = true or false?

                    Are you referencing it from any other strategies or indicators?

                    What chart type are you running this on when it errored?

                    Are you using Mini DataBox or DataBox?

                    Are you using Global Cross Hair?

                    When this happened do you remember what you were doing with the mouse?

                    -Brett
                    Last edited by Harry; 09-24-2012, 01:52 PM.

                    Comment


                      #11
                      Thanks guys, I tried for a good while today to reproduce this with no luck.

                      If you guys reproduce it again can you please post some more details on what if anything was the same.

                      If you can also reproduce please let me know at support at ninjatrader dot com ATTN: Brett as I will want to grab your workspace and environment to test on my side.

                      -Brett

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Dutch4756, Today, 04:57 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post Dutch4756  
                      Started by DerkWehler, 12-04-2024, 09:00 AM
                      7 responses
                      73 views
                      3 likes
                      Last Post RobEB
                      by RobEB
                       
                      Started by _Gabor_, 12-03-2024, 12:16 PM
                      4 responses
                      28 views
                      0 likes
                      Last Post _Gabor_
                      by _Gabor_
                       
                      Started by trelling, 11-28-2024, 01:50 PM
                      6 responses
                      51 views
                      0 likes
                      Last Post trelling  
                      Started by nelslynn, Today, 03:52 PM
                      0 responses
                      6 views
                      0 likes
                      Last Post nelslynn  
                      Working...
                      X