Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator showing error in NinjaScript Output although indicator is not in the Chart

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

    Indicator showing error in NinjaScript Output although indicator is not in the Chart

    Hi,

    I have an indicator which had (now is corrected) a logical error: I defined an array of 20 terms but in the code I was looping for 30 terms.

    I didn't have this indicator in any chart, but allways I opened the indicator window of an existing chart, an error appeared in my NinjaScript Output window.

    So, it was as if NT were running this "not inserted" indicator and showed the "logical" error.

    I corrected the code and then it stopped to show the error.

    Is this normal?

    #2
    Hello artson,

    When you open the indicator window all indicators are created to get the defaults. If you were getting an error when opening the window that points to a problem in the indicators OnStateChange override.
    JesseNinjaTrader Customer Service

    Comment


      #3
      Hi, I think I din't express it correctly.

      Is it possible, that in a chart, just opening the indicator window in order to insert an indicator, but still not selecting any indicator, the NT shows an error in the Output, because a coded indicator has this error?????

      It is clear, that if an indicator has in its code, an array of 20 members, and during the execution I will look up for the position array[21], it will show an error.
      This is clear.
      But I would understand, that as long as I don't use this "wrong" indicator, no error message should appear.....

      But this was not my case.
      I had a chart, I opened the indicator window to insert an indicator, and before I selected any, the error messega was already there....

      Is this normal?

      (I mean, I have corrected my "wrong" indicator and I don't see this error anymore, but to check if this could be a bug....

      Comment


        #4
        Hello artson,

        I understood the question, yes thats normal. All indicators are created when you open that window. Your indicator had an error in its OnStateChange override.

        JesseNinjaTrader Customer Service

        Comment


          #5
          Thanks a lot Jesse!!!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by fx.practic, 10-15-2013, 12:53 AM
          5 responses
          5,406 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by Shai Samuel, 07-02-2022, 02:46 PM
          4 responses
          98 views
          0 likes
          Last Post Bidder
          by Bidder
           
          Started by DJ888, Yesterday, 10:57 PM
          0 responses
          8 views
          0 likes
          Last Post DJ888
          by DJ888
           
          Started by MacDad, 02-25-2024, 11:48 PM
          7 responses
          160 views
          0 likes
          Last Post loganjarosz123  
          Started by Belfortbucks, Yesterday, 09:29 PM
          0 responses
          9 views
          0 likes
          Last Post Belfortbucks  
          Working...
          X