- charts do not show the entry and exit points
- under the Strategy tab on the control panel, the "position" tab will show no position, even though under the position tab, it will show an open position, and the account performance tab will generate results for that strategy. It will show the trades made, but when I click on the trade in the table to bring up the chart, the chart will not show the trade.
- backtesting shows zero trades happening, though I know conditions are met and it trades in real time.
Kind of mysterious. Perhaps it has to do with the way the entry is printing. Here is the relevant code:
if (((Divergence(ergodicfastPeriod, "ergodic", positiveD, 1,ergodicslowPeriod).Plot0[0] == 2 && Divergence(cciPeriod, "cci", positiveD, 9,26).Plot0[0] == 2) || (Divergence(ergodicfastPeriod, "ergodic", positiveD, 1,ergodicslowPeriod).Plot0[0] == 2 && Divergence(macdfastPeriod, "macd", positiveD, macdsignalPeriod,macdslowPeriod).Plot0[0] == 2) || (Divergence(cciPeriod, "cci", positiveD, 9,26).Plot0[0] == 2 && Divergence(macdfastPeriod, "macd", positiveD, macdsignalPeriod,macdslowPeriod).Plot0[0] == 2)) && Position.MarketPosition == MarketPosition.Flat && LinRegSlope(300)[0] > 0 ) { atmStrategyId = GetAtmStrategyUniqueId(); orderId = GetAtmStrategyUniqueId(); AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Limit, Low[0], 0, TimeInForce.Day, orderId, "AtmStrategyTemplate", "Diverg Long ATM Entry"); } { // Submits an entry limit order at the current low price to initiate an ATM Strategy if both order id and strategy id are in a reset state // **** YOU MUST HAVE AN ATM STRATEGY TEMPLATE NAMED 'AtmStrategyTemplate' CREATED IN NINJATRADER (SUPERDOM FOR EXAMPLE) FOR THIS TO WORK **** if (orderId.Length == 0 && atmStrategyId.Length == 0 && Close[0] > Open[0]) { atmStrategyId = GetAtmStrategyUniqueId(); orderId = GetAtmStrategyUniqueId(); AtmStrategyCreate(Cbi.OrderAction.Buy, OrderType.Limit, Low[0], 0, TimeInForce.Day, orderId, "AtmStrategyTemplate", "Diverg Long ATM Entry"); }
Comment