Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue with using Add() in NT7 Indicator

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

    Issue with using Add() in NT7 Indicator

    After having used
    Add(PeriodType periodType, int period)
    In my NT 7 Indicator.
    When I switch symbols a few times from EURUSD to EURJPY etc.
    Eventually my chart becomes blank.
    Is there something I should do after I finish using Add?
    Do I need to dispose of the BarsArray?
    Thoughts?

    #2
    Hello trader3419,

    Thank you for your post.

    There should be no need to dispose of the called instrument series in this case.

    Do you receive an error on screen? Are there errors on the Log tab of the Control Center? If so, what do these errors report?

    I look forward to your response.

    Comment


      #3
      Thanks for your response.
      I actually got no errors but a few pairs were blank if I changed to them.

      Keep in mind that I overloaded the dispose function.
      Also once I disposed of those instruments I stopped getting blank charts.
      I just added in BarsArray[1].Dispose();
      BarsArray[2].Dispose();

      Even though I stopped getting the issue, is there any reccomendations you have?

      Comment


        #4
        Hello trader3419,

        Thank you for your response.

        I would not have any recommendations here, I am glad that you found a solution here though.
        I will test and report this unexpected behavior as a bug.

        Comment


          #5
          Originally posted by trader3419 View Post
          Add(PeriodType periodType, int period)
          What PeriodType and value are you using here? Can you copy and paste each Add() used?

          Comment


            #6
            Add("$EURUSD",PeriodType.Minute,5);
            Is an example.
            Also a 10 minute one

            Comment


              #7
              Hello trader3419,

              Thank you for your response.

              Do you have a workspace that you were testing this on that I may test?

              You can send over your workspace by going to the Control Center-> Help-> Mail to Platform Support-> ensure the Workspaces option is enabled.

              Please place 'ATTN: Patrick H - 1504586' in the subject line.

              Comment


                #8
                I don't have the ability to upload my workspace at this time.
                But I am positive the issue arises from using Add() in the initalize function.
                while overloading the dispose function.
                and then switching around pairs a few times (I think the same pair you added).
                Then eventually that chart goes blank while on live data

                Comment


                  #9
                  Hello trader3419,

                  So disposing resolves the matter or causes the matter?

                  Comment


                    #10
                    overloading the dispose function without actually disposing of the BarsArray[1] and [2]
                    Is when I had the issue.I was only disposing of other things not the BarsArray.

                    but once I added in the 2 lines of code to dispose of BarsArray it fixed the issue

                    Sorry if that wasn't clear

                    Comment


                      #11
                      Originally posted by trader3419 View Post
                      overloading the dispose function without actually disposing of the BarsArray[1] and [2]
                      Is when I had the issue.I was only disposing of other things not the BarsArray.

                      but once I added in the 2 lines of code to dispose of BarsArray it fixed the issue

                      Sorry if that wasn't clear
                      Did your overloaded dispose call base.dispose()?

                      Comment

                      Latest Posts

                      Collapse

                      Topics Statistics Last Post
                      Started by CarlTrading, 03-31-2026, 09:41 PM
                      1 response
                      152 views
                      1 like
                      Last Post NinjaTrader_ChelseaB  
                      Started by CarlTrading, 04-01-2026, 02:41 AM
                      0 responses
                      87 views
                      1 like
                      Last Post CarlTrading  
                      Started by CaptainJack, 03-31-2026, 11:44 PM
                      0 responses
                      131 views
                      2 likes
                      Last Post CaptainJack  
                      Started by CarlTrading, 03-30-2026, 11:51 AM
                      0 responses
                      127 views
                      1 like
                      Last Post CarlTrading  
                      Started by CarlTrading, 03-30-2026, 11:48 AM
                      0 responses
                      106 views
                      0 likes
                      Last Post CarlTrading  
                      Working...
                      X