Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

NinjaScript generated code appears corrupt

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

    NinjaScript generated code appears corrupt

    Every core indicator is throwing a "CS0103 - the name "indicator" does not exist in current context" after a trivial change and recompile of a strategy (changed onpricechange to onbarclose and compiled).

    The error points to generated code in all indicators - sample below from ADL:
    namespace NinjaTrader.NinjaScript.Strategies
    {
    public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
    {
    public Indicators.ADL ADL()
    {
    return indicator.ADL(Input);
    }

    public Indicators.ADL ADL(ISeries<double> input )
    {
    return indicator.ADL(input);
    }
    }
    }
    #endregion

    To be clear, I was working on a STRATEGY and INDICATORS got corrupted when strategy was compiled.

    Strategy was working fine up until this simple change. This is the SECOND time this has happened to me. First time I just re-installed NT8. Would prefer not to do that again.

    ​Log and Trace zip files included. Did not notice NT8 in windows event viewer but will await your instruction on what extract you may require there.

    Thanks,
    Clint
    Attached Files

    #2
    Hello cshox,

    You may be missing a reference to a system file.

    May I have a screenshot of the References window?


    May I have a screenshot of the full compile error message?
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      Please note the strategy was built without errors, tested without errors, and ran for days without errors. If there was a missing reference, would that not have shown itself long before this last minor changes? And if it's missing, how would that happen if they've never been touched?

      Apologies for my tone - frustration creeping in. I was an IT PM for 15 years, you'd think I'd be chill but noooooo... lol

      reference snapshot attached as well as extract of compile errors (many so just extracted to CSV and attached)
      Attached Files

      Comment


        #4
        Hello cshox,
        1. Remove the reference to C:\Users\Clint\Documents\NinjaTrader 8\bin\Custom\NinjaTrader.Vendor.dll.
        2. Shutdown NinjaTrader
        3. Delete the NinjaTrader.Vendor.dll file and NinjaTrader.Vendor.cs in the same directory if this exists.
          1. If there is a folder named NinjaTrader within the bin\Custom\ folder, delete this as well.
        4. Run the repair from the 8.1.3.1 installer.
          1. https://account.ninjatrader.com/welcome-download

        Let me know if this does not resolve the error.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          It works.

          You my friend are a god! Not only for your technical expertise but because you ignored my petty whining and got right to solving the problem. Bravo!! Well done.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by argusthome, 03-08-2026, 10:06 AM
          0 responses
          69 views
          0 likes
          Last Post argusthome  
          Started by NabilKhattabi, 03-06-2026, 11:18 AM
          0 responses
          42 views
          0 likes
          Last Post NabilKhattabi  
          Started by Deep42, 03-06-2026, 12:28 AM
          0 responses
          24 views
          0 likes
          Last Post Deep42
          by Deep42
           
          Started by TheRealMorford, 03-05-2026, 06:15 PM
          0 responses
          27 views
          0 likes
          Last Post TheRealMorford  
          Started by Mindset, 02-28-2026, 06:16 AM
          0 responses
          54 views
          0 likes
          Last Post Mindset
          by Mindset
           
          Working...
          X