PDA

View Full Version : Backtest Optimazation Rules?



leighok1
05-22-2016,
If I have a strategy that has 2 parameters, lets call them A & B both can range from 1 to 100 and I want to optimize, but A must always be greater than B, is there anyway I can stop the optimizer from even trying the tests that don't fit the criteria?

Leonelloel
05-22-2016,
Thank you for your post and welcome to the NinjaTrader Support Forum!

When setting the value you can make sure it's the max of either the other value or it's own. For example: set { greater = Math.Max(lesser, value); }

liiTuth
05-24-2016,
Thanks, am I right in thinking that doesn't stop the backtest, but forces the parameters to be a valid setup?

LesleeNah
05-24-2016,
hat is correct, it would force the parameters to be correct when starting the strategy.

LettieTard
05-24-2016,
When setting the value you can make sure it's the max of either the other value or it's own. For example: set { greater = Math.Max(lesser, value); }