Announcement

Collapse

Looking for a User App or Add-On built by the NinjaTrader community?

Visit NinjaTrader EcoSystem and our free User App Share!

Have a question for the NinjaScript developer community? Open a new thread in our NinjaScript File Sharing Discussion Forum!
See more
See less

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 Rapine Heihei, 04-23-2024, 07:51 PM
            2 responses
            30 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by Shansen, 08-30-2019, 10:18 PM
            24 responses
            943 views
            0 likes
            Last Post spwizard  
            Started by Max238, Today, 01:28 AM
            0 responses
            9 views
            0 likes
            Last Post Max238
            by Max238
             
            Started by rocketman7, Today, 01:00 AM
            0 responses
            4 views
            0 likes
            Last Post rocketman7  
            Started by wzgy0920, 04-20-2024, 06:09 PM
            2 responses
            28 views
            0 likes
            Last Post wzgy0920  
            Working...
            X