Announcement

Collapse
No announcement yet.

Partner 728x90

Collapse

Bug: Backtesting or Optimizing a double variable that is negative

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

    Bug: Backtesting or Optimizing a double variable that is negative

    When you try to backtest or optimize a double that is negative (ie, below 0), the GUI just resets it to 0.1.

    For instance, if I want to test the range of -0.5 to 1.5, it will not allow me to do so, just resetting to 0.1 instead, and not allowing any negative entries.

    Using NT 6.5.1000.7.

    Is there a work around for this? I really need this to work.

    Mike

    #2
    Hi Mike,

    One of our NinjaScript trainees will respond at a later time today. Thank you for your patience
    Josh P.NinjaTrader Customer Service

    Comment


      #3
      Hello,


      Go into your properites at the bottom of your code and change the line of code that looks something like this:


      set { my_input = Math.Max(0.1, value); }

      To:

      set { my_input = value; }

      Note: you will only need to change this line for one User variable; the one you are talking about below.
      DenNinjaTrader Customer Service

      Comment

      Latest Posts

      Collapse

      Topics Statistics Last Post
      Started by charlesugo_1, 05-26-2026, 05:03 PM
      0 responses
      60 views
      0 likes
      Last Post charlesugo_1  
      Started by DannyP96, 05-18-2026, 02:38 PM
      1 response
      147 views
      0 likes
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 05-11-2026, 05:56 AM
      0 responses
      162 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 05-10-2026, 08:12 PM
      0 responses
      97 views
      0 likes
      Last Post CarlTrading  
      Started by Hwop38, 05-04-2026, 07:02 PM
      0 responses
      284 views
      0 likes
      Last Post Hwop38
      by Hwop38
       
      Working...
      X