Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

suddenly i cant compile

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

    suddenly i cant compile

    I cant seem to get a clean compile of even the simplest files. the errors show as orange line instead of the normal beige and the error make no sense. asking for a ; on a section definitintion. what happened?
    here is the code
    Code:
    #region Using declarations
    using System;
    using System.ComponentModel;
    using System.Diagnostics;
    using System.Drawing;
    using System.Drawing.Drawing2D;
    using System.Xml.Serialization;
    using NinjaTrader.Cbi;
    using NinjaTrader.Data;
    using NinjaTrader.Indicator;
    using NinjaTrader.Gui.Chart;
    using NinjaTrader.Strategy;
    #endregion
    // This namespace holds all strategies and is required. Do not change it.
    namespace NinjaTrader.Strategy
    {
    ///<summary>
    /// Enter the description of your strategy here
    ///</summary>
    [Description("Enter the description of your strategy here")]
    publicclass a2tema : Strategy
    {
    #region Variables
    // Wizard generated variables
    privateint tp = 14; // Default setting for Tp
    // User defined variables (add any user defined variables below)
    #endregion
    ///<summary>
    /// This method is used to configure the strategy and is called once before any strategy method is called.
    ///</summary>
    protectedoverridevoid Initialize()
    {
    CalculateOnBarClose = true;
    }
    ///<summary>
    /// Called on each bar update event (incoming tick)
    ///</summary>
    protected oerride void OnBarUpdate()
    {
    if(Slope(TEMA(tp),tp,0 > 0 && Slope(TEMA(tp),tp,1 < 0)))
    { 
    EnterLong("LONG");
    }
    
    if(Slope(TEMA(tp),tp,0 < 0 && Slope(TEMA(tp),tp,1 > 0)))
    {
    EnterShort("SHORT");
    }
    }
    #region Properties
    [Description("")]
    [GridCategory("Parameters")]
    publicint Tp
    {
    get { return tp; }
    set { tp = Math.Max(1, value); }
    }
    #endregion
    }
    }

    #2
    Hello,

    The error message being the orange color is pointing to another script that is having the issue. You can double click on the error message and it will take you to the offending portion of the code.
    Cal H.NinjaTrader Customer Service

    Comment


      #3
      but where am I calling another script?

      Comment


        #4
        Ragdoll,

        You are not, however, NinjaTrader compiles all your scripts to ensure the best possible run time and error free compilation.
        Cal H.NinjaTrader Customer Service

        Comment

        Latest Posts

        Collapse

        Topics Statistics Last Post
        Started by charlesugo_1, 05-26-2026, 05:03 PM
        0 responses
        51 views
        0 likes
        Last Post charlesugo_1  
        Started by DannyP96, 05-18-2026, 02:38 PM
        1 response
        142 views
        0 likes
        Last Post NinjaTrader_ChelseaB  
        Started by CarlTrading, 05-11-2026, 05:56 AM
        0 responses
        160 views
        0 likes
        Last Post CarlTrading  
        Started by CarlTrading, 05-10-2026, 08:12 PM
        0 responses
        96 views
        0 likes
        Last Post CarlTrading  
        Started by Hwop38, 05-04-2026, 07:02 PM
        0 responses
        275 views
        0 likes
        Last Post Hwop38
        by Hwop38
         
        Working...
        X