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

Please check the 'GetMinMaxValues' method

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

    Please check the 'GetMinMaxValues' method

    Hi,

    I'm getting the following error in one of my indicators:

    Error on calculating indicator min/max value for indicator 'Indi201'. Please check the 'GetMinMaxValues' method: Collection was modified; enumeration operation may not execute.

    The indicator works, except that none of the plot values are showing in the Data Box.

    I have no idea what the 'GetMinMaxValues' method is - tried doing a Find within the indicator, and came up with nothing. Any suggestion on where I should start looking for the error?

    Thanks!

    #2
    Hello nicbizz,

    Thank you for note.

    Please send me your log and trace files for today so that I may look into what occurred.

    You can do this by going to the Control Center-> Help-> Mail to Support.

    Please put 'ATTN: Patrick' in the subject line and a reference to this thread in the body of the e-mail: http://www.ninjatrader.com/support/f...ad.php?t=55717

    I look forward to your response.

    Comment


      #3
      Hello,

      Thank you for that information.

      From your Trace file I see the following error:
      • 2013-02-07 10:17:06:798 *************** unhandled exception trapped ***************
      • 2013-02-07 10:17:06:798 Collection was modified; enumeration operation may not execute.
      • 2013-02-07 10:17:06:798 at System.Collections.ArrayList.ArrayListEnumeratorSi mple.MoveNext()


      It appears you may be changing the contents of a list during enumeration. I would suggest making liberal use of Try/Catch statements to see if you can isolate the section the issue is occurring in.

      You can find our reference sample on Try/Catch blocks at the following link: http://www.ninjatrader.com/support/f...ead.php?t=9825

      Please let me know if you have any questions.

      Comment


        #4
        Thanks Patrick,

        I'll go through my Lists in detail.

        -Nick

        Comment


          #5
          Hi,

          This is an old thread, but I'm still suffering from the same problem.

          I've used try/catch blocks all over my code, but other than the error message in the Log tab, it doesn't seem to throw out any additional information.

          The other thing I notice is that this error frequently occurs when I'm using Live Data (i.e. connected to a data feed). On historical charts, it rarely, if ever comes up.

          Any ideas on how I may identify the problem?

          Thanks!

          Comment


            #6
            Hello nicbizz,

            Thank you for your response.

            In the Output window in NinjaTrader do you see any information? Do you have any external programs that may interfere or adjust files in NinjaTrader?

            I look forward to your response.

            Comment


              #7
              Hi Patrick,

              Nothing appears in the Output window.

              As far as I know, I don't have any modules or any other 3rd party program attached to NinjaTrader.

              The only thing I have running is the indicator.

              -Nick

              Comment


                #8
                Patrick,

                I forgot to mention, the other message that sometimes appear in the Log in place of the "GetMinMaxValues method" error above:

                "Error on plotting values to chart data box for indicator 'Ind201'. Please check the 'OnBarUpdate' method: Collection was modified; enumeration operation may not execute."

                I havent been able to figure out how they're related, or why one appears in place of the other.

                -Nick

                Comment


                  #9
                  Hello nicbizz,

                  Thank you for your response.

                  Please send me your log and trace files for today so that I may look into what occurred.

                  You can do this by going to the Control Center-> Help-> Mail to Support.

                  Please put 'ATTN: Patrick - 787974' in the subject line and a reference to this thread in the body of the e-mail: http://www.ninjatrader.com/support/f...ad.php?t=55717

                  I look forward to your response.

                  Comment


                    #10
                    Patrick,

                    I tried a little experiment whereby I loaded a few revisions of the indicator, at the same time, on a chart.
                    For instance, I'll have Nick201, Nick202, Nick203 running on the same chart.

                    Strangely enough, 2 out of the 3 would load without any problems.
                    And the error would not always occur on the same indicator (sometimes its Nick201 that craps out, and then when I hit refresh, it could be Nick202 instead).

                    I thought it was something worth mentioning.

                    Thanks for your help on this!

                    -Nick

                    Comment

                    Latest Posts

                    Collapse

                    Topics Statistics Last Post
                    Started by warreng86, 11-10-2020, 02:04 PM
                    5 responses
                    1,356 views
                    0 likes
                    Last Post NinjaTrader_Manfred  
                    Started by Perr0Grande, Today, 08:16 PM
                    0 responses
                    3 views
                    0 likes
                    Last Post Perr0Grande  
                    Started by elderan, Today, 08:03 PM
                    0 responses
                    5 views
                    0 likes
                    Last Post elderan
                    by elderan
                     
                    Started by algospoke, Today, 06:40 PM
                    0 responses
                    10 views
                    0 likes
                    Last Post algospoke  
                    Started by maybeimnotrader, Today, 05:46 PM
                    0 responses
                    12 views
                    0 likes
                    Last Post maybeimnotrader  
                    Working...
                    X