Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Error on calling 'EventHandlerMarketData' method

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

    Error on calling 'EventHandlerMarketData' method

    I've built a Custom Indicator and it lists this error in the log tab after running for about an hour:
    Error on calling 'EventHandlerMarketData' method: Index was outside the bounds of the array.


    Interestingly, when I try to debug with VS, it will not throw any exceptions so that I can see where it is taking place. What is 'EventHandlerMarketData' and how can I debug it?

    #2
    Hello swcooke,

    This appears to be an error you have experienced before.
    I have a host/guest Indicator arrangement and I just cannot seem to escape the the Index Outside of the Bounds of the Array error. If I run the guest without the host, it is rock solid. However, when I run the host (which calls the guest) I get these errors: Indicator 'Guest': Error on calling 'EventHandlerMarketData' method:


    Please send an email to platormsupport [at] ninjatrader [dot] com, with a link to this forum post for further assistance.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Yes, it is. Can you give me some more info about EventHandlerMarketData so I can try to debug from my end?

      Comment


        #4
        Hello swcooke, thanks for your reply.

        EventHandlerMarketData is not documented, so I do not have any further information I can disclose about that method. We had a problem back in the beta that would cause this error, and this was fixed. I am assuming you are running the latest version of NinjaTrader.



        The beta problem was a race condition due to multi threading, any threading related code that might be in your script should be scrutinized.

        Since Visual Studio is not hitting the exception, you would need to add Print statements throughout the script to see where exactly that error is getting hit. Once you find that, I will need a test script if it is consistently reproducible that does not include DLL files.

        Best regards.

        Comment


          #5
          Thanks Chris,

          I seem to recall that you sent me a sample script back in April but I cannot locate it. Do you have any record of sending me a working version of something to my email that is associated with this forum account? If so, can you resend? Also, can you confirm if I create an indicator that exposes a Series, do I have to use Update() before my script returns the value of the Series or are Series Objects exempt from needing to do that?

          Comment


            #6
            swcooke, I found the ticket. The ticket number is 2488133, can you look this up in your email inbox to see the full thread? If you need me to upload the script I sent I can do that as well.

            Comment


              #7
              Hi swcooke,

              There was a ticket opened with our QA team from that ticket you opened but was closed as we could not reproduce the problem. If you have a strategy that can consistently reproduce it I can take a look at this again.
              Attached Files
              Last edited by NinjaTrader_ChrisL; 09-03-2020, 03:19 PM.

              Comment


                #8
                Hi Chris,

                I cannot find the email you sent to me and I think that would probably help the most. I want to see a working version just as you would do it (without my code at all). If you could please send that script to the email you sent it to last time that would be very helpful. Thanks,

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, Yesterday, 10:06 AM
                0 responses
                17 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                16 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                14 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                9 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                38 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X