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 CarlTrading, 03-31-2026, 09:41 PM
      1 response
      87 views
      1 like
      Last Post NinjaTrader_ChelseaB  
      Started by CarlTrading, 04-01-2026, 02:41 AM
      0 responses
      47 views
      0 likes
      Last Post CarlTrading  
      Started by CaptainJack, 03-31-2026, 11:44 PM
      0 responses
      66 views
      2 likes
      Last Post CaptainJack  
      Started by CarlTrading, 03-30-2026, 11:51 AM
      0 responses
      69 views
      0 likes
      Last Post CarlTrading  
      Started by CarlTrading, 03-30-2026, 11:48 AM
      0 responses
      58 views
      0 likes
      Last Post CarlTrading  
      Working...
      X