PDA

View Full Version : Bug: Backtesting or Optimizing a double variable that is negative


ctrlbrk
10-31-2008, 04:16 AM
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

NinjaTrader_Josh
10-31-2008, 08:39 AM
Hi Mike,

One of our NinjaScript trainees will respond at a later time today. Thank you for your patience

NinjaTrader_Ben
10-31-2008, 11:02 AM
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.