Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NT8 Exception - Chart Panel Related

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

    NT8 Exception - Chart Panel Related

    Just fyi, Hit an exception in the chart panel control code while refreshing a custom indicator.




    I probably refreshed it 30 times over the course of a few hours before it happened. I don't have much more information than that.

    Thanks,
    Chris

    #2
    Hello crokusek, and thank you for your report.

    You mentioned using a custom indicator. Is this an open source indicator? By this, I mean that there would be a C# file that matches your indicator's name in (My) Documents\NinjaTrader 8\bin\Custom\Indicators if it was open source.

    If it is open source, would it be possible to provide us with a stripped down copy of this indicator? If you would rather not share it publicly you can e-mail it to platformsupport[at]ninjatrader[dot]com with attn:ninjatrader_jessicap and 1581275 in the subject line.

    If it is closed source (you do not have a matching C# file) or you would rather not send us any code, could you try to reproduce this with a built-in indicator? It will make it easier to make the same thing happen on our end if you are.

    If your custom indicator came from one of our partner vendors, you may want to follow up with them as well as us. Messages such as "index out of range" are ones that could occur both inside NinjaTrader and in a partner vendor's NinjaScript.
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Yes that message is not useful without a context.

      The 2nd screenshot however shows the stack trace where it occurred and may be useful to your side. To me it appears it is accessing a chart panel or tab # that does not exist. Also at least to my eye the stack trace doesn't explicitly show the custom indicator being involved directly with the exception. Probably refreshing any indicator 100 times in a row with many windows and many tabs open might create it.

      Anyway, this issue is rare so far so feel free to close if you do not wish to followup the stack trace with one of your coders. if it continues I will try and create a repro as you suggest.

      Comment


        #4
        I agree the context was useful, thanks again for providing both images. I did notice that the area that this occurred in - NinjaTrader.Gui.Chart.ChartControl.RefreshIndicato rs - is an area from which a lot of hook methods into custom NinjaScript code are dispatched. This creates a space that includes both our own, our partner's, and our customer's NinjaScript products. It is often helpful even if the ultimate cause is a partner vendor's or customer's product to isolate those components that are causing things like this, since it puts us in a better position to answer other customer's and partner's queries when they end up in similar situations.

        That said we appreciate our customers and respect their time. We are happy for any help improving NinjaTrader 8 that we can get from our terrific base here on the forums. If a code sample would be of any difficulty to come by, however, the following information should be enough for us to investigate this matter.

        Please send me your log and trace files, templates, and other files, so that I may look into what occurred.
        You can do this by going to the Control Center-> Help-> Email Support.
        Please reference the following ticket number in the body of the email: 1581352
        Please include Attn:NinjaTrader_JessicaP in the body of your e-mail.
        IMPORTANT: Please also tick all the boxes in the "Other Files" section.
        Jessica P.NinjaTrader Customer Service

        Comment


          #5
          Get ChartControl.RefreshIndicators List() error.

          Hi,

          The error shown below was occurring consistently while rolling over expiration dates (8.0.0.2) and I reported it awhile back here. Unfortunately it brings down the whole system so is very disruptive.



          Can I request that a try/catch/log be placed around get_item (its probably in brackets []) there as an interim solution? I cannot provide any more information at this time and it is not reproducible as I've completed the rollover. I think it is a race condition and not a programming logic error. Something about the multiple dialogs being open and closed while the chart started a refresh. As shown in the stack trace the custom indicator is not directly involved.

          Thanks,
          Chris

          2016-12-09 23:14:50:386 System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
          Parameter name: index
          at System.ThrowHelper.ThrowArgumentOutOfRangeExceptio n(ExceptionArgument argument, ExceptionResource resource)
          at System.Collections.Generic.List`1.get_Item(Int32 index)
          at NinjaTrader.Gui.Chart.ChartControl.<>c__DisplayCla ss537_2.<RefreshIndicators>b__9(Object o)
          at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
          at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
          at System.Threading.QueueUserWorkItemCallback.System. Threading.IThreadPoolWorkItem.ExecuteWorkItem()
          at System.Threading.ThreadPoolWorkQueue.Dispatch()

          Comment


            #6
            Hello Chris,

            As your new thread's post was on the same subject and same error message, I have moved your post into the existing thread on this topic.

            Are you able to reproduce the behavior without any 3rd party or custom scripts within the NinjaTrader folder within Documents?
            (This would indicate an issue with the platform we must report)

            If not, can you provide a stripped down sample script that only contains the code necessary to reproduce the behavior?

            If this is an open source script, you can add try and catches to the script. A note, that when adding a try and catch, you should print the error as this will prevent any errors from appearing in the Log.

            Below is a publicly available link to a 3rd party educational site that demonstrates using a try and catch.
            Use the try keyword. This keyword describes protected regions of code.

            Use the catch and when keywords. Catch is an important part of exception handling.


            Please note, in the support department at NinjaTrader we do not create, debug, or modify code for our clients. This is so that we can maintain a high level of service for all of our clients as well as our partners.
            Chelsea B.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by aa731, Today, 02:54 AM
            0 responses
            4 views
            0 likes
            Last Post aa731
            by aa731
             
            Started by thanajo, 05-04-2021, 02:11 AM
            3 responses
            470 views
            0 likes
            Last Post tradingnasdaqprueba  
            Started by Christopher_R, Today, 12:29 AM
            0 responses
            10 views
            0 likes
            Last Post Christopher_R  
            Started by sidlercom80, 10-28-2023, 08:49 AM
            166 responses
            2,237 views
            0 likes
            Last Post sidlercom80  
            Started by thread, Yesterday, 11:58 PM
            0 responses
            4 views
            0 likes
            Last Post thread
            by thread
             
            Working...
            X