Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Issue with AMS Add-ons Errors with Custom & AMS Indicators

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

    Issue with AMS Add-ons Errors with Custom & AMS Indicators

    One of our clients, who is using both our proprietary ICF Market Ltd indicators and AMS add-ons, is encountering an issue when trying to load the AMS_BarPriceStats indicator. The following error appears:
    Unable to create an instance of NinjaScript 'NinjaTrader.NinjaScript.Indicators.AMS.AMS_BarPri ceStats'. Most likely either the implementation no longer exists, there is no default constructor defined, the default constructor does not work correctly, or the OnStateChange implementation is flawed.

    To troubleshoot the issue, we have already taken the following steps:
    1. Verified that the class has a default constructor.
    2. Checked the OnStateChange implementation, particularly in State.SetDefaults.
    3. Recompiled all NinjaScript files (Tools > NinjaScript Editor > Compile).
    4. Deleted the bin/Custom folder and restarted NinjaTrader to rebuild the scripts.
    5. Ensured that all required AMS add-on files are properly installed and available.

    Despite these efforts, the issue persists, and our client is unable to use the AMS indicators. Could you please assist us in identifying and resolving the problem?

    Best regards,
    ICF Market Ltd
    ​
    icfmarket
    NinjaTrader Ecosystem Vendor - ICF Market

    #2
    Hello icfmarket,

    This error can indicate a few different issues.

    An instance of the script was saved in a workspace or template and then the user imported a new version that had changes so a new instance needs to be added and the workspace or template resaved.

    There could be an issue with code in OnStateChange() or the constructor.

    There could be an issue with a public variable that needs the XmlIgnore attribute.

    There might be other issues that are specific to assemblies such as using the dynamic keyword for system classes like drawing objects or using system enums.

    We need to identify the specific lines of code or behavior that are causing the issue.

    May I confirm after importing a version a new instance is added to a chart and all previous instances are removed?
    Is the workspace or template being resaved?
    Does the error occur when adding a new instance?

    Make a copy of the script as a test script you can reduce.
    Ensure the copy has the same issue.

    Remove all logic from OnBarUpdate() and see if the behavior can still be reproduced.

    Then comment out all custom method and property declarations and see if the behavior can still be reproduced.

    Comment out the class constructor and see if the behavior can still be reproduced.

    If after something was removed the behavior stops, add that one component back and see if the behavior returns.

    The me know what that line or those lines of code are that brings the behavior.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Hi dear Chelsea B.,

      Thank you so much for your detailed and comprehensive response. I will share these points with the client and see which of the topics you mentioned are relevant to their case.
      I really appreciate it.

      Best regards,

      ​ICF MARKET LTD

      Official Vendor
      icfmarket
      NinjaTrader Ecosystem Vendor - ICF Market

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by argusthome, 03-08-2026, 10:06 AM
      0 responses
      55 views
      0 likes
      Last Post argusthome  
      Started by NabilKhattabi, 03-06-2026, 11:18 AM
      0 responses
      37 views
      0 likes
      Last Post NabilKhattabi  
      Started by Deep42, 03-06-2026, 12:28 AM
      0 responses
      17 views
      0 likes
      Last Post Deep42
      by Deep42
       
      Started by TheRealMorford, 03-05-2026, 06:15 PM
      0 responses
      19 views
      0 likes
      Last Post TheRealMorford  
      Started by Mindset, 02-28-2026, 06:16 AM
      0 responses
      49 views
      0 likes
      Last Post Mindset
      by Mindset
       
      Working...
      X