Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Index errors

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

    #16
    Jesse,

    We seem to be going in a circle.: This is what you said earlier: if you see an error with only this line, making sure you commented out all the other lines, then we could focus on that as the first issue. I would need to see how you defined the variable for SorRSignal and how you created it in OnStateChange to better understand the problem.

    1.)That line caused the error
    2.)I sent you the .cs file so you could see whatever you need to determine if I created it correctly.

    I am attaching the .cs file again. Where do we go from here?
    Attached Files

    Comment


      #17
      Hello galsermil,

      I looked at the file you attached again however that still does not contain the code you had asked about. If you see a problem in this script I would need to know what code you are specifically asking for help with.

      In post 3 you asked for help with a specific couple of lines of code, where is that code in this file? The code in post 3 is what my replies have been for, if you are asking for a different part of the script then you need to provide more specific detail on the lines of code you need help with.

      Comment


        #18
        Jesse,

        Are you looking at the code with the editor or Visual Studio? The lines in question are 114 -116 in the editor. I am getting an indexing error when I enable ITEntryStrategyCopy and that is what I am asking for help with and we know with your trial and mine the two lines that cause the problem. There is certain information that you said that you needed and as far as I am concerned that information is in the .cs file.

        Comment


          #19
          Hello galsermil,

          The lines in question are 114 -116 in the editor.
          Code:
          //RorSSignal[0] = 1;
          // RorSSignal[0] = SupportandResistanceDetection1.SandRSignal[0];
          Print(Instrument.FullName + " " + Time[0] + " S or R Signal " + SupportandResistanceDetection1.SandRSignal[0]);
          These are lines 114 - 116 in the file you attached, while they are similar this is not the same series that you asked about in post 3. The reply I provided was specific to the code in post 3 but that code is not present in this file so you would just have to take away how to break the problem into smaller pieces to find the specific cause from that information.

          You have these two lines commented out so I don't know which you had an issue with. Did you have an issue with the print on line 116 specifically? If so you need to debug the SupportandResistanceDetection indicator. If that line gives an error that is the indicator you are dealing with so you would have to diagnose why that's giving an error.


          Comment


            #20
            Jesse,

            I changed the name of the plot to see if that made any difference and it did not. The Print Statement using the SandRSignal from the Indicators is the one not causing the problem but the minute you insert SorRSignal( the plot created in this strategy), the error occurs. Is it possible that one of the other data series is being referenced with what should be their Bar number of -1?

            Comment


              #21
              Hello galsermil,

              I am having a hard time understanding the problem as you are asking about code that is not present in the script you provided. If you used code that is not present in the file you attached then the file you attached is not going to be helpful at figuring out the problem.

              Keep in mind the two previous samples you included did not include any code for "SorRSignal", you asked about "SorRSignal" in post 3 as well but that code is not present. At this point I am not certain how to help as you have not included the relevant code.

              If you need to define a new series and want it called SorRSignal then you need to make a new series for that https://ninjatrader.com/support/help...t8/seriest.htm




              Comment


                #22
                Jesse,

                You are making a mockery of the purpose of the Focus group. You so called professionals are supposed to render assistance to us novices. What part of 'Changed the name' do you not understand? Does it not seem reasonable that if I changed the name of a plot that I would make the corrections necessary, otherwise it would not compile and at a minimum the compiler would remind me of the corrections that must be made. I will go elsewhere for my help or at least wait until you are no longer on duty when hopefully I will get a professional that can add 2 +2 and get 4.

                Comment


                  #23
                  Hello galsermil,

                  We can only help if the details you provide are accurate, if you are changing names the you need to either review the existing help that was already provided for your original code and apply name changes where relevant or provide an updated example that specifically states what you wanted help with in that new sample. If you need further assistance please update the question to reflect the new sample that you are providing.


                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by NullPointStrategies, Today, 05:17 AM
                  0 responses
                  50 views
                  0 likes
                  Last Post NullPointStrategies  
                  Started by argusthome, 03-08-2026, 10:06 AM
                  0 responses
                  126 views
                  0 likes
                  Last Post argusthome  
                  Started by NabilKhattabi, 03-06-2026, 11:18 AM
                  0 responses
                  69 views
                  0 likes
                  Last Post NabilKhattabi  
                  Started by Deep42, 03-06-2026, 12:28 AM
                  0 responses
                  42 views
                  0 likes
                  Last Post Deep42
                  by Deep42
                   
                  Started by TheRealMorford, 03-05-2026, 06:15 PM
                  0 responses
                  46 views
                  0 likes
                  Last Post TheRealMorford  
                  Working...
                  X