Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Compile error on removed indicator

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

    Compile error on removed indicator

    I get an error on an indicator I created, which has been removed.

    I changed an indicator, removing an exposed variable resulting in several errors, all “ . . .does not contain a definiton for . . .”, on indicators using the exposed variable. I excluded the indicators from compilation, fixing all the errors, except for 3 errors on one indicator. This indicator had already been excluded when the exposed variable was removed. Seemed strange, but OK, it was old, hadn't been used for over a year. I removed the exclusion and put it back on, same errors. I removed the excluded indicator, it (the removed indicator) now shows about 10 errors for the changed indicator and errors referencing another indicator it uses. All errors are “does not contain a definiton for . . .”.

    I can't find the indicator in Documents/NinjaTrader 8/bin/Custom, or the name in any other indicator likely to have the name used somehow.

    What am I missing, how does an indicator that's apparently removed/deleted, cause compilation errors ? What's the fix ?

    Thanks,

    Bruce

    #2
    Hello BGWTEX,

    That depends on the full error message is saying.

    It could be another .cs file is attempting to call a class that was removed.

    It could be that an assembly reference is attempting to load a missing file.

    To know the issue we would have to see the error message.

    To fix the issue, we would have to know what the issue is.

    Can you provide a screenshot?

    To send a screenshot with Windows 7 or newer I would recommend using Window's Snipping Tool.

    Click here for instructions

    Alternatively to send a screenshot press Alt + PRINT SCREEN to take a screen shot of the selected window. Then go to Start--> Accessories--> Paint, and press CTRL + V to paste the image. Lastly, save as a jpeg file and send the file as an attachment.

    Click here for detailed instruction

    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      OK, Chelsea,

      Screenshot attached.

      "a001ORTrade" is the indicator which was excluded & is now removed.

      "a01Input" is the indicator that was changed.

      Bruce
      Attached Files

      Comment


        #4
        How about a .xlxs file (attached), or this below ?
        The definition, 'eSMacGAmt', in the error message below, still exists in 'NinjaTrader.NinjaScript.Indicators.a01Input'. The definition which was deleted is not causing an error.
        a001ORTrade.cs 'NinjaTrader.NinjaScript.Indicators.a01Input' does not contain a definition for 'eSMacGAmt' and no extension method 'eSMacGAmt' accepting a first argument of type 'NinjaTrader.NinjaScript.Indicators.a01Input' could be found (are you missing a using directive or an assembly reference?)

        Comment


          #5
          Attached ? Oh, not allowed. . .

          Need a better screenshot ?

          Comment


            #6
            Hello BGWTEX,

            Is a001ORTrade calling a01Input on line 414?

            What code is on that line?

            Does a01Input call eSMacGAmt anywhere in the code?

            Can you provide these scripts to confirm this?

            Is a21EnumsStrat.stratORTrdAGR still holding the BRACKET_Open enum?
            Chelsea B.NinjaTrader Customer Service

            Comment


              #7
              "Is a001ORTrade calling a01Input on line 414?"
              "What code is on that line?"

              I don't understand your questions.
              From the original post, "I get an error on an indicator I created, which has been removed.", a001ORTrade is the indcator that's removed, so how can it be calling anything ?

              "Does a01Input call eSMacGAmt anywhere in the code?"
              I don't think so, a01Input is the indicator that has and exposes the variable.

              "Is a21EnumsStrat.stratORTrdAGR still holding the BRACKET_Open enum?"
              Yes.

              "Can you provide these scripts to confirm this?"
              The whole indicator or just the script line ? "a21EnumsStrat" is below with "BRACKET_Open" in red.

              Would you like "a01Input" pasted as I did "a21EnumsStrat", or is there a better way to send it ? I can't compile, so I cant export, so I'm not sure how to get it to you.



              #region Using declarations
              using System;
              using System.Collections.Generic;
              using System.ComponentModel;
              using System.ComponentModel.DataAnnotations;
              using System.Linq;
              using System.Text;
              using System.Threading.Tasks;
              using System.Windows;
              using System.Windows.Input;
              using System.Windows.Media;
              using System.Xml.Serialization;
              using NinjaTrader.Cbi;
              using NinjaTrader.Gui;
              using NinjaTrader.Gui.Chart;
              using NinjaTrader.Gui.SuperDom;
              using NinjaTrader.Gui.Tools;
              using NinjaTrader.Data;
              using NinjaTrader.NinjaScript;
              using NinjaTrader.Core.FloatingPoint;
              using NinjaTrader.NinjaScript.DrawingTools;
              #endregion

              //This namespace holds Indicators in this folder and is required. Do not change it.
              namespace a21EnumsStrat //Xa21EnumsStrat Xb21EnumsStratBackUp
              {
              //Entry
              //Long/Short
              public enum stratAllowedA
              {
              Long,
              Short,
              Auto_Select
              }
              //Price
              public enum stratORTrdAGR
              {
              Bracket_Last,
              Bracket_Open,
              Open_Range_LMT,
              Open_Range_BO,
              _______________________,
              // XXXXXXXXXXXXXXXXXXXXXXX,
              Open__Limit_and_BO_Stop,
              Range_Low__Limit, //Open_Range_Low__Limit
              Range_Low__Limit_and_BO_Stop, //Open_Range_Low__Limit_and_BO_Stop
              First_Low_Wiggle__Limit,
              Second_Low_Wiggle__Limit,
              Open_Range_High__Limit,
              First_High_Wiggle__Limit
              }
              ////Reverse Entry
              // public enum stratReverse
              // {
              // Test__Session,
              // No_Test__Reverse_All_Trades,
              // Test__In_Trade,
              // Reverse_Not_Allowed
              // }
              // public enum stratAllowedB
              // {
              // Long,
              // Short,
              // None
              // }
              // //Value Area Trade
              // public enum ValueAreaEntry
              // {
              // Fade,
              // Breakout,
              // }
              // //Value Area Trade
              // public enum ValueAreaLocation
              // {
              // Value_Area_FrontRun,
              // Value_Area,
              // Mac1_Limit,
              // Wiggle_Limit
              // }
              // public enum stratVAFdAGR
              // {
              // _1_VAFrontRun,
              // _2_VA,
              // _3_Mac1,
              // _9_WiggleLimit
              // }
              // public enum stratVABoAGR
              // {
              // _1_VAFrontRun,
              // _2_VA,
              // _3_Mac1,
              // _9_WiggleLimit
              // }
              // //IB Trade
              // public enum stratIBFdAGR
              // {
              // _1_IBFrontRun,
              // _2_IB,
              // _3_Mac1,
              // _9_WiggleLimit
              // }
              // public enum stratIBBoAGR
              // {
              // _1_REStop,
              // _2_IB_wRE,
              // _9_WiggleLimit_wRE
              // }
              // //Developing Value Area Trade
              // public enum stratDVFdAGR
              // {
              // _1_DVFrontRun,
              // _2_DV,
              // _3_Mac1,
              // _9_WiggleLimit
              // }
              //Accounts
              // //OR Trade
              // public enum stratReverse
              // {
              // Reverse_Not_Allowed,
              // OR_Breakout__Always_Reverse,
              // Full_Session_Test,
              // Real_Time_Test
              // }
              }







              Comment


                #8
                Hello BGWTEX,

                Based on the message, a001ORTrade.cs is not removed. Have you checked the Documents\NinjaTrader 8\bin\Custom folder and all sub folders to confirm that file is not there. The error messages says it's there. That is the file causing the error, as that the file name shown in the NinjaScript File column.

                By provide the scripts, I mean attach the .cs files. Likely you will not be able to export due to the compile errors. So zip up the .cs files and attach with your post.
                Last edited by NinjaTrader_ChelseaB; 05-09-2021, 06:42 PM.
                Chelsea B.NinjaTrader Customer Service

                Comment


                  #9

                  From the original post, "I can't find the indicator in Documents/NinjaTrader 8/bin/Custom, or the name in any other indicator likely to have the name used somehow.".

                  The Zip file for the entire Bin/custom folders was too large to upload, but here are the Indicators & Strategies folders.
                  Attached Files

                  Comment


                    #10
                    Hello BGWTEX,

                    What happens when you double click on the error message?

                    a001ORTrade.cs is in the Indicators.zip file you have provided.
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      OK, this is getting weird.

                      a001ORTrade now shows in the NS Editor.

                      I do NOT see a001ORTrade.cs, viewing bin/Custom using Windows File Explorer.
                      I DO see a001ORTrade.cs, searching bin/Custom using Windows File Explorer.
                      "Show in folder" highlights @TRIX.cs.

                      When I double clicked on the error message, which was before my original post, nothing happened.

                      I haven't tried double clicking on the error message again & I'm not touching a thing until I hear form you.

                      NT is open with minimum workspace, NS Editor & a T&S.

                      What's next ?

                      Bruce

                      Comment


                        #12
                        Hello Bruce,

                        Double clicking on an error message should open the file with the error in the NinjaScript Editor if there is file.
                        Chelsea B.NinjaTrader Customer Service

                        Comment


                          #13
                          Maybe my post # 11 was not clear, could I get you to read the entire post and tell me what part is not clear to you ?

                          Could I get you to reread all the posts, then let's get to where you understand the problem so you can respond with something helpful ?

                          Comment


                            #14
                            You're telling me how to open the file, after I just told you it was there, "a001ORTrade now shows in the NS Editor.".

                            But that is not the entire problem, and you have not suggested a fix for the problem. Read the posts.

                            Comment


                              #15
                              Hello BGWTEX,

                              My confusion is that the file is in the zip you gave us. That is telling me it is there.

                              There is an error message with the filename that has the error in the NinjaScript Editor. That is telling me it is there.

                              I am happy to schedule a call and find the file for you.

                              Please send an email to scriptingsupport [at] ninjatrader [dot] com.


                              We are currently trying the file to look at line 414 to get the information I requested in Post #6.

                              The error messages are you telling you what is wrong. Find the file and to go the line indicated in the error message.

                              I can't give you a fix until we see the line code causing error. We will continue tracing that back if there are further methods called.
                              Last edited by NinjaTrader_ChelseaB; 05-10-2021, 10:18 AM.
                              Chelsea B.NinjaTrader Customer Service

                              Comment

                              Latest Posts

                              Collapse

                              Topics Statistics Last Post
                              Started by D Trader, Today, 04:02 PM
                              0 responses
                              2 views
                              0 likes
                              Last Post D Trader  
                              Started by aligator, Today, 02:09 PM
                              2 responses
                              15 views
                              0 likes
                              Last Post Harry
                              by Harry
                               
                              Started by NinjaTrader_Kate, Today, 02:40 PM
                              0 responses
                              5 views
                              0 likes
                              Last Post NinjaTrader_Kate  
                              Started by patpat, Today, 11:34 AM
                              1 response
                              6 views
                              0 likes
                              Last Post NinjaTrader_ChrisL  
                              Started by crystalet, Today, 10:41 AM
                              3 responses
                              14 views
                              0 likes
                              Last Post crystalet  
                              Working...
                              X