I have created a strategy that sends a profit target at the time of entry in the OnBarUpdate() method in the following manner:
SetProfitTarget("", CalculationMode.Price, NNNN);
In addition, after entry has occurred, I have additional code that is below the entry code in the following manner:
if (Position.MarketPosition == MarketPosition.Long)
{
SetProfitTarget("", CalculationMode.Price, NNNN);
}
However, only one set of orders (i.e., the orders generated at entry) is generated during the backtest according to the Strategy Analyzer's Order page. It appears that Ninjatrader is not updating the dynamic profit targets.
How do I get Ninjatrader to dynamically adjust Profit Targets on each bar update buring a BACKTEST?
Comment