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 t.kelly4149, Today, 05:36 PM
          1 response
          7 views
          0 likes
          Last Post bltdavid  
          Started by SilverSurfer1, Today, 06:29 PM
          0 responses
          16 views
          0 likes
          Last Post SilverSurfer1  
          Started by trader3000a, Today, 01:06 PM
          1 response
          9 views
          0 likes
          Last Post NinjaTrader_ShawnB  
          Started by marcus2300, Today, 11:45 AM
          3 responses
          31 views
          0 likes
          Last Post marcus2300  
          Started by pel11, Today, 11:06 AM
          0 responses
          13 views
          0 likes
          Last Post pel11
          by pel11
           
          Working...
          X