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 Geovanny Suaza, 02-11-2026, 06:32 PM
        0 responses
        558 views
        0 likes
        Last Post Geovanny Suaza  
        Started by Geovanny Suaza, 02-11-2026, 05:51 PM
        0 responses
        324 views
        1 like
        Last Post Geovanny Suaza  
        Started by Mindset, 02-09-2026, 11:44 AM
        0 responses
        101 views
        0 likes
        Last Post Mindset
        by Mindset
         
        Started by Geovanny Suaza, 02-02-2026, 12:30 PM
        0 responses
        545 views
        1 like
        Last Post Geovanny Suaza  
        Started by RFrosty, 01-28-2026, 06:49 PM
        0 responses
        547 views
        1 like
        Last Post RFrosty
        by RFrosty
         
        Working...
        X