Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

The type Ninjatrader.Strategy.Strategy already contains a definition for _indicator

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

    The type Ninjatrader.Strategy.Strategy already contains a definition for _indicator

    Hi,

    Unfortunately, after attempting to import some ninjascript, we've received the following errors:

    The type Ninjatrader.Strategy.Strategy already contains a definition for _indicator
    The type Ninjatrader.Strategy.Strategy already contains a definition for BarsRequired
    The type Ninjatrader.Strategy.Strategy already contains a definition for OnBarClose

    And so on.

    Tried removing all custom indicators and strategies and the error persists upon compilation. Also tried repairing the NT install. No luck. Is there an xml file to clean up?

    Any thoughts?

    Thanks,
    B.

    #2
    bigdavediode, would you mind contacting me at support at ninjatrader dot com with the file you're trying to import here so I could further check into? It sounds like it was maybe not made for your version of NT7.
    BertrandNinjaTrader Customer Service

    Comment


      #3
      Genetic Optimizer

      Hi,

      The file imported was the Piersh genetic optimizer ( http://www.bigmiketrading.com/ninjat...optimizer.html ) phgenetic, the latest version.

      Deleting the Users\username\my documents\NinjaTrader 7\bin\Custom\Strategy\@Strategy.cs allows compilation normally, without errors. This is odd because this file appears to be restored upon repairing of Ninjatrader.

      Does deleting this file fall into the category of "bad idea?"

      Thanks,
      B.

      Comment


        #4
        It looks like that script was exported with NT 6.5 and it then replaced your 7's @Strategy.cs which led to the issues, generally we would not advice touching the system indicators / scripts. NT7 would have per default a Genetic Optimizer, so I would advice checking into this first of all - I think the script was created initially as NT 6.5 did not have support for a GA.
        BertrandNinjaTrader Customer Service

        Comment


          #5
          I notice that it has recreated this file. Odd that the Ctrl-Panel->Programs and Features repair restored (what appears to be) the incorrect file.

          Thanks for your help.

          Comment


            #6
            So you removed the script giving you issues and the installed @Strategy.cs and then run the repair and it would still result in a incompilable state for you?
            BertrandNinjaTrader Customer Service

            Comment


              #7
              Yes, that's correct. All additional indicators and strategies were removed, @strategy.cs was deleted, a repair was run, (an incorrect?) strategy.cs was restored by the repair process, and the problem persisted.

              However, just deleting the file allowed compilation to proceed correctly. @strategy.cs appears to have been regenerated. (Naturally we couldn't roll back the image on the VM because we had no snapshot. Don't ask, bracket-unhappy-face-bracket.)

              The piers phgenetic optimizer was reported to work correctly under NT7, just not for us.

              Thanks again for your help,
              B.

              Comment

              Latest Posts

              Collapse

              Topics Statistics Last Post
              Started by TraderBCL, Today, 02:37 AM
              0 responses
              1 view
              0 likes
              Last Post TraderBCL  
              Started by mangel2000, Today, 02:23 AM
              0 responses
              4 views
              0 likes
              Last Post mangel2000  
              Started by mangel2000, Today, 01:30 AM
              0 responses
              11 views
              0 likes
              Last Post mangel2000  
              Started by Doxxxx, Today, 01:24 AM
              0 responses
              5 views
              0 likes
              Last Post Doxxxx
              by Doxxxx
               
              Started by ezekilany, Today, 01:10 AM
              0 responses
              4 views
              0 likes
              Last Post ezekilany  
              Working...
              X