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

Optimizer throws assertion

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

    Optimizer throws assertion

    I have a strategy base class that doesn't do anything but support the class that inherits from it. It should never be called or even considered. So I assigned string.Empty to the name and that makes it so it doesn't appear in the UI and therefore can't be selected, which is what I want.

    Unfortunately, the strategy analyzer doesn't like it. It throws a big assertion dialog that begins with "NS object with bad localized name."

    Apparently, making this base class appear invisible requires more than making the name an empty string. So what's the right way to do that?

    #2
    Thank you for your question traderpards. If you make your class abstract it will be invisible to the strategy analyzer. Abstract classes in C# do not share the limitations of abstract classes in other languages. I have attached a copy of the SampleMACrossover strategy. The only modifications to this strategy that were made were changing the name and adding the abstract keyword. Please let us know if there are any other ways we can help.
    Attached Files
    Jessica P.NinjaTrader Customer Service

    Comment


      #3
      Thanks! That worked....

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by love2code2trade, 04-17-2024, 01:45 PM
      4 responses
      36 views
      0 likes
      Last Post love2code2trade  
      Started by alifarahani, Today, 09:40 AM
      2 responses
      13 views
      0 likes
      Last Post alifarahani  
      Started by junkone, Today, 11:37 AM
      3 responses
      15 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by pickmyonlineclass, Today, 12:23 PM
      0 responses
      1 view
      0 likes
      Last Post pickmyonlineclass  
      Started by frankthearm, Yesterday, 09:08 AM
      12 responses
      44 views
      0 likes
      Last Post NinjaTrader_Clayton  
      Working...
      X