Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

double variable can't be set less than 1?

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

    double variable can't be set less than 1?

    I use a double variable in my strategy which needs to be set to a value of 0.5. However during backtesting, I can't set the variable to less than 1 in the strategy start up page even though I declare the variable as a double. But when using optimization, I am able to set it to less than 1. Why is that so?

    #2
    tjendra, please check the properties section for your user defined input parameters, most likely connected to step 7 in this tip - http://www.ninjatrader-support2.com/...ead.php?t=5782

    Comment


      #3
      If it's not due to having a lower bound in your code as per Bertrand's suggestion, try restarting NT.

      I was having an issue yesterday whereas I could enter a double value when using the backtest, but during optimization it would allow me to enter doubles but then change them to 1 in the actual results. A restart sorted it out tho.

      Comment


        #4
        Originally posted by NinjaTrader_Bertrand View Post
        tjendra, please check the properties section for your user defined input parameters, most likely connected to step 7 in this tip - http://www.ninjatrader-support2.com/...ead.php?t=5782
        Hi Bertrand, your suggestion solve the problem. Thanks.

        Comment


          #5
          I set default values to the variables inside my strategy, but everytime I backtest my strategy, I have to manually change the variables values during the strategy startup page to be the same as what I had programmed within the strategy. Why is that so?

          I also have multiple instance of the same strategy but for different instruments set with different values to the variables inside my strategy. But on the strategy startup page, it doesn't reflect the default values for the different strategies as well. Is it possible to always show the default values for the different strategy during the strategy startup page?

          Comment


            #6
            tjendra,

            If your parameters all are named the same it will take the default parameter across all of your strategies that have the same parameter names. Instead, try using separate parameter names and that will keep everything unique.
            Josh P.NinjaTrader Customer Service

            Comment


              #7
              Originally posted by NinjaTrader_Josh View Post
              tjendra,

              If your parameters all are named the same it will take the default parameter across all of your strategies that have the same parameter names. Instead, try using separate parameter names and that will keep everything unique.
              Yes Josh, the parameters all are named the same. But within the strategy, the variables values are set differently. U mean the backtest will just take same values across all the strategies if the parameters are named the same even though they are set differently within the strategy?

              Comment


                #8
                That is correct. Please try different names.
                Josh P.NinjaTrader Customer Service

                Comment

                Latest Posts

                Collapse

                Topics Statistics Last Post
                Started by argusthome, 03-08-2026, 10:06 AM
                0 responses
                117 views
                0 likes
                Last Post argusthome  
                Started by NabilKhattabi, 03-06-2026, 11:18 AM
                0 responses
                61 views
                0 likes
                Last Post NabilKhattabi  
                Started by Deep42, 03-06-2026, 12:28 AM
                0 responses
                40 views
                0 likes
                Last Post Deep42
                by Deep42
                 
                Started by TheRealMorford, 03-05-2026, 06:15 PM
                0 responses
                44 views
                0 likes
                Last Post TheRealMorford  
                Started by Mindset, 02-28-2026, 06:16 AM
                0 responses
                82 views
                0 likes
                Last Post Mindset
                by Mindset
                 
                Working...
                X