Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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.

      JesseNinjaTrader Customer Service

      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.


          JesseNinjaTrader Customer Service

          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




              JesseNinjaTrader Customer Service

              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.


                  JesseNinjaTrader Customer Service

                  Comment

                  Latest Posts

                  Collapse

                  Topics Statistics Last Post
                  Started by Philippe56140, Today, 02:35 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post Philippe56140  
                  Started by 00nevest, Today, 02:27 PM
                  0 responses
                  1 view
                  0 likes
                  Last Post 00nevest  
                  Started by Jonafare, 12-06-2012, 03:48 PM
                  5 responses
                  3,986 views
                  0 likes
                  Last Post rene69851  
                  Started by Fitspressorest, Today, 01:38 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post Fitspressorest  
                  Started by Jonker, Today, 01:19 PM
                  0 responses
                  2 views
                  0 likes
                  Last Post Jonker
                  by Jonker
                   
                  Working...
                  X