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 JoMoon2024, Today, 06:56 AM
          0 responses
          6 views
          0 likes
          Last Post JoMoon2024  
          Started by Haiasi, 04-25-2024, 06:53 PM
          2 responses
          17 views
          0 likes
          Last Post Massinisa  
          Started by Creamers, Today, 05:32 AM
          0 responses
          5 views
          0 likes
          Last Post Creamers  
          Started by Segwin, 05-07-2018, 02:15 PM
          12 responses
          1,786 views
          0 likes
          Last Post Leafcutter  
          Started by poplagelu, Today, 05:00 AM
          0 responses
          3 views
          0 likes
          Last Post poplagelu  
          Working...
          X