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

8.0.12 is a type but is used like a variable

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

    8.0.12 is a type but is used like a variable

    Hi,
    I've written an indicator that uses two commercial indicators contained in DLLs. I create these DLLs so I have the source code and also on a test machine running 8.0.10 I have the DLLs installed.
    The indicator that calls these two commercial indicators instantiates them like this, in a piece of do-once code in OnBarUpdate():

    bm2 = BetterMomentum2(useTickVolume,password);
    proam = BetterProAm(true,true,true,true,true,password);

    I have no problem, this works fine, in both my developer sourcecode Ninja and also my test machine with 8.0.10.
    The end user of this indicator also had no problem until he upgraded to 8.0.12, at which time the indicator will not compile these lines, complaining that "BetterMomemtum2" is a type but is used like a variable. Same for the BetterProAm.

    How do I fix this? Being more explicit, e.g. NinjaTrader.NinjaScript.Indicators.BetterMomentum2 did not change anything.

    Thanks,
    saltminer

    #2
    Hi saltminer,

    Are you able to compile the open source of your custom indicator on your end or does this only affect the end user?

    If your custom indicator is excluded from compilation are there still compile errors?

    Do these indicators work on a chart?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi,

      Are you able to compile the open source of your custom indicator on your end - YES
      or does this only affect the end user? - YES

      If your custom indicator is excluded from compilation [ON THE END USER'S MACHINE] are there still compile errors? - NO

      Do these indicators work on a chart? - YES

      Thanks,
      saltminer.

      Comment


        #4
        Hello saltminer,

        To confirm, you are not able to reproduce the behavior on your end, is this correct?

        What version of NinjaTrader 8 are you using? (Help -> About)

        If you test the compiled assembly dlls in a new environment, are you able to reproduce the errors?

        If not, I would recommend testing a clean environment with the client.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Hi Chelsea,

          I have it working in sourcecode in 8.0.12. I also have it working with DLLs for the called indicators in 8.0.10 on another test machine of mine.
          The client cannot compile with DLLs on his 8.0.12 Ninja.

          The client had his NinjaTrader environment blow up on him massively when he installed 8.0.12. I'm not sure what state it is in but he has already had to do a complete uninstall and reinstall.

          So, do you see no reason for the error, other than "something is goofy with the NinjaTrader environment"?

          bm2 = BetterMomentum2(useTickVolume,password);
          proam = BetterProAm(true,true,true,true,true,password);

          Cheers,
          saltminer

          Comment


            #6
            does `new` keyword
            ... = new BetterMomentum2()
            fix the problem?

            Comment


              #7
              Hello saltminer,

              Its likely something within the script or its something specific to the client environment.

              I was not able to confirm, are you able to reproduce the behavior on your end when importing the compiled assembly (from zip)?

              Below is a link to forum post where I have detailed how to create a clean testing environment (or export in the case of that particular thread).


              If you are able to reproduce on your end using the compiled assemblies, its something we need to address with the script.

              If you are not able to reproduce on your end using compiled assemblies, its something we should address with that specific client.

              So, are you able to reproduce the behavior on your end when importing the compiled assembly (from zip)?
              Chelsea B.NinjaTrader Customer Service

              Comment


                #8
                Hi,
                as I've said, I cannot reproduce the problem with compiled assemblies in v8.0.10
                The customer installed 8.0.12 and his problem started from then.
                I will install v12 myself and report back.

                saltminer

                Comment


                  #9
                  Updated to v12 and it still tests fine on my end. Must be something kablooey on the client's machine.

                  saltminer

                  Comment


                    #10
                    Hello saltminer,

                    Are you confirming you have exported the assembly, created a new clean testing environment, and then imported the compiled assembly into the clean testing environment and the script works without issue?
                    Chelsea B.NinjaTrader Customer Service

                    Comment


                      #11
                      Hi Chelsea,
                      I'm saying my already clean test environment with the DLL assembly and the source code indicator that uses the DLLs, which already worked in v8.0.10, was updated to v8.0.12 and continued to work without issue.
                      I think the fault is the client's machine, as I cannot replicate his problem.
                      saltminer

                      Comment


                        #12
                        Hello saltminer,

                        Sometimes there are errors just when importing that do not occur if the dlls are manually placed and references manually added.

                        I'm trying to make sure that you have tested in a clean environment and that you do not have the open source scripts and are testing specifically the importable package with the dlls.

                        However, none of your posts confirm this.

                        If you have and there is no issues with the import package (and also meaning there are no issues with the NinjaTrader Platform itself), then likely there is old assemblies causing the issue. Remove these first.
                        Chelsea B.NinjaTrader Customer Service

                        Comment

                        Latest Posts

                        Collapse

                        Topics Statistics Last Post
                        Started by alifarahani, Today, 09:40 AM
                        6 responses
                        31 views
                        0 likes
                        Last Post alifarahani  
                        Started by Waxavi, Today, 02:10 AM
                        1 response
                        17 views
                        0 likes
                        Last Post NinjaTrader_LuisH  
                        Started by Kaledus, Today, 01:29 PM
                        5 responses
                        14 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Started by Waxavi, Today, 02:00 AM
                        1 response
                        12 views
                        0 likes
                        Last Post NinjaTrader_LuisH  
                        Started by gentlebenthebear, Today, 01:30 AM
                        3 responses
                        17 views
                        0 likes
                        Last Post NinjaTrader_Jesse  
                        Working...
                        X