Thanks
// Submits an entry limit order to buy if the fast ma crosses above the slow ma and initiates an ATM Strategy to manage the entry.
// **** YOU MUST HAVE AN ATM STRATEGY TEMPLATE NAMED 'AtmStratSample' CREATED IN NINJATRADER (SUPERDOM FOR EXAMPLE) FOR THIS TO WORK ****
if (CrossAbove(SMA(Fast), SMA(Slow), 1)) &&
orderId.Length == 0 && atmStrategyId.Length == 0 ;
{
atmStrategyId = GetAtmStrategyUniqueId();
orderId = GetAtmStrategyUniqueId();
AtmStrategyCreate(Action.Buy, OrderType.Limit, Close[0], 0, TimeInForce.Day, orderId, "AtmStratSample", atmStrategyId);
}
Comment