Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Missing variable in Srategy

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

    Missing variable in Srategy

    Hi. I have been working with and fine tuning a strategy of mine. I just recently added a variable to my existing list, but I can't seem to get Ninja to recognize it when I pull up the strategy to backtest or run in simulation mode. It is acting as if it is not there. I have compiled and saved the strategy and each time I open the strategy to edit, I can see it in the code, but it does not seem to get recognized by Ninja.

    Do I need to perform another step to get it recognized somehow?

    Thanks

    #2
    Mannygags,

    I am happy to assist you.

    Yes, there is an additional step if you simply added a variable to the code.

    If you look at the section : Properties at the bottom of the editor when you have the strategy open, then expand it by clicking the "+" icon to the left, it will show necessary code for user defined variables.

    It looks something like this :

    Code:
            #region Properties
            [Description("")]
            [GridCategory("Parameters")]
            public int Fast
            {
                get { return fast; }
                set { fast = Math.Max(1, value); }
            }
    
            [Description("")]
            [GridCategory("Parameters")]
            public int Slow
            {
                get { return slow; }
                set { slow = Math.Max(1, value); }
            }
    
            [Description("")]
            [GridCategory("Parameters")]
            public int StopLoss
            {
                get { return stopLoss; }
                set { stopLoss = Math.Max(1, value); }
            }
    
            [Description("")]
            [GridCategory("Parameters")]
            public int TakeProfit
            {
                get { return takeProfit; }
                set { takeProfit = Math.Max(1, value); }
            }
            #endregion
    Please let me know if I may assist further.
    Adam P.NinjaTrader Customer Service

    Comment


      #3
      Thanks! That's what I needed.

      Comment


        #4
        Mannygags,

        You're welcome.

        Please don't hesitate to contact us should you require additional assistance.
        Adam P.NinjaTrader Customer Service

        Comment


          #5
          Another quick question. I am looking at purchasing a new amchine to trade on. Is Ninja supported on Windows 7? Are there any known issues?

          Thanks again.

          Comment


            #6
            Mannygags,

            NinjaTrader works in WIndows XP/Vista and 7. There are no known issues in using it across platforms.

            Please let me know if I may assist further.
            Adam P.NinjaTrader Customer Service

            Comment

            Latest Posts

            Collapse

            Topics Statistics Last Post
            Started by CarlTrading, 03-31-2026, 09:41 PM
            1 response
            152 views
            1 like
            Last Post NinjaTrader_ChelseaB  
            Started by CarlTrading, 04-01-2026, 02:41 AM
            0 responses
            89 views
            1 like
            Last Post CarlTrading  
            Started by CaptainJack, 03-31-2026, 11:44 PM
            0 responses
            131 views
            2 likes
            Last Post CaptainJack  
            Started by CarlTrading, 03-30-2026, 11:51 AM
            0 responses
            127 views
            1 like
            Last Post CarlTrading  
            Started by CarlTrading, 03-30-2026, 11:48 AM
            0 responses
            107 views
            0 likes
            Last Post CarlTrading  
            Working...
            X