When I add the line:
SetProfitTarget(CalculationMode.Percent,TargetBP/10000.0);
to the Initialize() metthod I get the following:
3/31/2009 11:35:03 AM Default Error on running backtest: Object reference not set to an instance of an object.
The backtest runs ok with the profit target not set. I'm using the following to get in:
if(pullback == 0.0) {
EnterLong();
}
else {
EnterLongLimit((10000-pullback)/10000*Close[0]);
}
and the equivalent for getting short....
Thx,
John
Comment