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