Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Ninjascript generated code throwing compile errors....

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

    Ninjascript generated code throwing compile errors....

    Hi Guys

    This is with beta 3.

    Here is the code that Ninja has generated at the end of my script:

    Code:
    #region NinjaScript generated code. Neither change nor remove.
    
    namespace NinjaTrader.NinjaScript.Indicators
    {
    	public partial class Indicator : NinjaTrader.Gui.NinjaScript.IndicatorRenderBase
    	{
    		private JT_v5_DepthSales[] cacheJT_v5_DepthSales;
    		public JT_v5_DepthSales JT_v5_DepthSales()
    		{
    			return JT_v5_DepthSales(Input);
    		}
    
    		public JT_v5_DepthSales JT_v5_DepthSales(ISeries<double> input)
    		{
    			if (cacheJT_v5_DepthSales != null)
    				for (int idx = 0; idx < cacheJT_v5_DepthSales.Length; idx++)
    					if (cacheJT_v5_DepthSales[idx] != null &&  cacheJT_v5_DepthSales[idx].EqualsInput(input))
    						return cacheJT_v5_DepthSales[idx];
    			return CacheIndicator<JT_v5_DepthSales>(new JT_v5_DepthSales(), input, ref cacheJT_v5_DepthSales);
    		}
    	}
    }
    
    namespace NinjaTrader.NinjaScript.MarketAnalyzerColumns
    {
    	public partial class MarketAnalyzerColumn : MarketAnalyzerColumnBase
    	{
    		public Indicators.JT_v5_DepthSales JT_v5_DepthSales()
    		{
    			return indicator.JT_v5_DepthSales(Input);
    		}
    
    		public Indicators.JT_v5_DepthSales JT_v5_DepthSales(ISeries<double> input )
    		{
    			return indicator.JT_v5_DepthSales(input);
    		}
    	}
    }
    
    namespace NinjaTrader.NinjaScript.Strategies
    {
    	public partial class Strategy : NinjaTrader.Gui.NinjaScript.StrategyRenderBase
    	{
    		public Indicators.JT_v5_DepthSales JT_v5_DepthSales()
    		{
    			return indicator.JT_v5_DepthSales(Input);
    		}
    
    		public Indicators.JT_v5_DepthSales JT_v5_DepthSales(ISeries<double> input )
    		{
    			return indicator.JT_v5_DepthSales(input);
    		}
    	}
    }
    
    #endregion
    And here are the errors it's now throwing:

    The type 'NinjaTrader.NinjaScript.Indicators.Indicator' already contains a definition for 'cacheJT_v5_DepthSales'

    Type 'NinjaTrader.NinjaScript.Indicators.Indicator' already defines a member called 'JT_v5_DepthSales' with the same parameter types

    Type 'NinjaTrader.NinjaScript.Indicators.Indicator' already defines a member called 'JT_v5_DepthSales' with the same parameter types

    Type 'NinjaTrader.NinjaScript.MarketAnalyzerColumns.Mar ketAnalyzerColumn' already defines a member called 'JT_v5_DepthSales' with the same parameter types

    Type 'NinjaTrader.NinjaScript.MarketAnalyzerColumns.Mar ketAnalyzerColumn' already defines a member called 'JT_v5_DepthSales' with the same parameter types

    NinjaScript File Error Code Line Column
    Type 'NinjaTrader.NinjaScript.Strategies.Strategy' already defines a member called 'JT_v5_DepthSales' with the same parameter types

    NinjaScript File Error Code Line Column
    Type 'NinjaTrader.NinjaScript.Strategies.Strategy' already defines a member called 'JT_v5_DepthSales' with the same parameter types

    All errors are referencing the generated lines of code.

    These errors do not appear when I open up Ninja8 (which I presume still does a compile on open).

    I can also re-open Ninja after a compile and export the indicators. I just cannot compile them from the NinjaScript editor.

    Cheers

    Pete

    #2
    Hello Pete,

    Is this a strategy that you can share?

    If so, please add the .cs file and all needed indicators to your next post so that I may take a look.

    If not, please create a sample strategy that you are able to share that can reproduce the issue.
    Chelsea B.NinjaTrader Customer Service

    Comment


      #3
      It's indicator code, not a strategy.

      Unfortunately, I cannot share it. It's part of a commercial product.

      Comment


        #4
        Hello DionysusToast,

        Please create a simple indicator that is able to reproduce the issue and attach this to your next post.
        Chelsea B.NinjaTrader Customer Service

        Comment


          #5
          Originally posted by DionysusToast View Post
          It's indicator code, not a strategy.

          Unfortunately, I cannot share it. It's part of a commercial product.
          This type of code I don't post but send to Support directly.

          Comment

          Latest Posts

          Collapse

          Topics Statistics Last Post
          Started by Aviram Y, Today, 05:29 AM
          0 responses
          1 view
          0 likes
          Last Post Aviram Y  
          Started by quantismo, 04-17-2024, 05:13 PM
          3 responses
          25 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by ScottWalsh, 04-16-2024, 04:29 PM
          7 responses
          34 views
          0 likes
          Last Post NinjaTrader_Gaby  
          Started by cls71, Today, 04:45 AM
          0 responses
          6 views
          0 likes
          Last Post cls71
          by cls71
           
          Started by mjairg, 07-20-2023, 11:57 PM
          3 responses
          216 views
          1 like
          Last Post PaulMohn  
          Working...
          X