Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Indicator showing only on 1 char?

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

    Indicator showing only on 1 char?

    Hello,

    I had my own indicator on say Chart A, configured it, hit Apply & OK. I can see the indicator on the chart

    I opened a new chart say Chart B, configured it, hit Apply & OK. I can see the indicator on the chart.

    I then click on Chart A, and the indicator is no longer plotted.

    When I applied the indicator on Chart B, a message was output: Indicator 'MyExpMA': Error on calling 'OnBarUpdate' method on bar 22082: You are accessing an index with a value that is invalid since it is out-of-range.

    Obviously there is an error in bar indexing. But the error doesn't come up when I only use the indicator on 1 chart.

    What could be the problem?

    Thanks, Caesar.

    #2
    Hello Skechers,

    Thank you for your note.

    That would be difficult to say without testing the indicator and reviewing the logic to see what may be occurring. Can you provide the custom indicator you are using? You can export it through Tools > Export > NinjaScript Addon. Do not check the box to export as a compiled assembly or I will not be able to review the logic. Please attach the resulting .Zip file to your reply.

    Thanks in advance; I look forward to assisting you further.

    Comment


      #3
      Here it is
      Attached Files

      Comment


        #4
        Hello Skechers,

        Thank you for your reply.

        I suspect it's the use of static for your Series<T> variables. Try removing that so it's just this:

        private Series<int> CrossDirection; // Define a Series<T> variable.
        private Series<double> MyMAExp; // Define a Series<T> variable.

        I'm not seeing it disappear off the first chart when this change is made.

        Please let us know if we may be of further assistance to you.​

        Comment


          #5
          Awesome, worked like a charm. Many Thanks Kate!

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Geovanny Suaza, 02-11-2026, 06:32 PM
          0 responses
          633 views
          0 likes
          Last Post Geovanny Suaza  
          Started by Geovanny Suaza, 02-11-2026, 05:51 PM
          0 responses
          364 views
          1 like
          Last Post Geovanny Suaza  
          Started by Mindset, 02-09-2026, 11:44 AM
          0 responses
          105 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Started by Geovanny Suaza, 02-02-2026, 12:30 PM
          0 responses
          567 views
          1 like
          Last Post Geovanny Suaza  
          Started by RFrosty, 01-28-2026, 06:49 PM
          0 responses
          568 views
          1 like
          Last Post RFrosty
          by RFrosty
           
          Working...
          X