im using SampleAtmStrategy to develope my strategy with ATM. the Sample is working fine but i need to set my logic, and cancel or change entryorder price.
i have tested with the code in ninjatrader help but dont get cancel or change orders.
Can you help me ? thanks
AtmStrategyChangeEntryOrder(GetCurrentBid(), 0, "orderIdValue");
// ATM strategy methods only work during real-time
if (State != State.Realtime)
return;
string[] entryOrder = GetAtmStrategyEntryOrderStatus("orderId");
// checks if the entry order exists
// and the order state is not already cancelled/filled/rejected
if (entryOrder.Length > 0 && entryOrder[2] == "Working")
{
AtmStrategyCancelEntryOrder("orderId");
}

;
Comment