Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator plot randomly disappearing in panel

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

    Indicator plot randomly disappearing in panel

    Over the last few days a couple of custom indicators that I wrote (which have performed without any problems for months) have been sporadically disappearing in their respective panels. Pressing F5 brings the plots back and they work fine until the next time the plots disappear.

    An error message appears in the log: "Error on plotting values to chart data box for indicator 'XXX'. Please check the OnBarUpdate method. Object reference not set to an instance of an object.

    I have a try/catch block for everything in OnBarUpdate but I don't get anything in the output window. (Maybe my try/catch is messed up - see attached). It seems to happen in Market Replay a lot more than with a live feed.

    Code:
    try{
    BLOCK OF CODE
    }catch (Exception e){	Print("XXX Line 212 " + e.ToString());return;	}
    Can anyone provide any insight on what might be going on here? I thought it may be a corrupt workspace issue and have completely rebuilt that to no avail. Any other thoughts?

    Cheers,
    Taggart
    Last edited by Taggart; 02-05-2015, 07:05 PM.

    #2
    Hi Taggart, so you have the try / catch around individual OnBarUpdate() sections to isolate? Do you use the .Reset method here on any plots? Is the Databox usually opened when this occurs for you in replay?

    Comment


      #3
      Bertrand,

      Thanks for getting back to me.

      I have one big try/catch for all the code in OnBarUpdate. Is that ok? I'm a hack so I'm not sure. There is no reset method in the code. Yes, the databox is open.

      I should also add I just upgraded last night to the most recent version of NT (I was on the one previous) and nothing changed. I have made no other changes to anything in NT.

      Comment


        #4
        Taggart, thanks. Would the same be thrown if no databox was used while you tested?

        It would be more efficient to have smaller try / catch statements around code sections in your method, that way you can pinpoint where you run into the exception.

        Comment


          #5
          I'll try closing the databox and see what happens.

          Comment


            #6
            Bertrand,

            I have closed the databox and I am unable to reproduce the error. Unfortunately, I really need to use the databox. I have discovered a few things that may narrow down the search. Firstly, I was wrong about the frequency of which the problem occurred in market replay versus live feed. There is no difference. Secondly, the problem exists even if I am disconnected to any feed, which is curious to me as the log file error mentions OnBarUpdate. The OnBarUpdate should not be triggered if I'm not connected to anything, right? I can reproduce the error with regularity (when databox is open) it seems that randomly clicking from chart to chart causes the plot to disappear within the panel after some time.

            Comment


              #7
              Bertrand, this error occurs right below a post when I hit "Thanks" button:


              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 55

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 107

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 111

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 119

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 130

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 134

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 142

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 211

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/init.php on line 389

              Deprecated: Assigning the return value of new by reference is deprecated in /home/ninja002/public_html/support/forum/includes/class_core.php on line 2552
              ninZa
              NinjaTrader Ecosystem Vendor - ninZa.co

              Comment


                #8
                Originally posted by ninZa View Post
                Bertrand, this error occurs right below a post when I hit "Thanks" button:
                Thanks for the report, we will look into it further.

                Comment


                  #9
                  Originally posted by Taggart View Post
                  Bertrand,

                  I have closed the databox and I am unable to reproduce the error. Unfortunately, I really need to use the databox. I have discovered a few things that may narrow down the search. Firstly, I was wrong about the frequency of which the problem occurred in market replay versus live feed. There is no difference. Secondly, the problem exists even if I am disconnected to any feed, which is curious to me as the log file error mentions OnBarUpdate. The OnBarUpdate should not be triggered if I'm not connected to anything, right? I can reproduce the error with regularity (when databox is open) it seems that randomly clicking from chart to chart causes the plot to disappear within the panel after some time.
                  Thanks for the update Taggart, can you please send in your indicator to reproduce on our end to support? OnBarUpdate() would still be triggered even if not connected, you will still process historical bars.

                  Comment


                    #10
                    Ok, where should I send it?

                    Comment


                      #11
                      Hello Taggart,

                      Thanks for your reply.

                      You can send it to platformsupport[at]ninjatrader[dot]com
                      Include a link to this forum topic in the message.

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by Geovanny Suaza, 02-11-2026, 06:32 PM
                      0 responses
                      649 views
                      0 likes
                      Last Post Geovanny Suaza  
                      Started by Geovanny Suaza, 02-11-2026, 05:51 PM
                      0 responses
                      370 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by Mindset, 02-09-2026, 11:44 AM
                      0 responses
                      109 views
                      0 likes
                      Last Post Mindset
                      by Mindset
                       
                      Started by Geovanny Suaza, 02-02-2026, 12:30 PM
                      0 responses
                      574 views
                      1 like
                      Last Post Geovanny Suaza  
                      Started by RFrosty, 01-28-2026, 06:49 PM
                      0 responses
                      576 views
                      1 like
                      Last Post RFrosty
                      by RFrosty
                       
                      Working...
                      X