I created the ATM template, and I believe I added it to the strategy. Anyways, here's the relevant section of the code:
protected override void OnBarUpdate()
{
if (Historical)
return;
// Condition set 1
if (Force_Index_v02("EMA", 13, "EMA", 13).FastLine[0] > Force_Index_v02("EMA", 13, "EMA", 13).FastLine[1]
&& EMA_Slope_Color(20, true)[0] > EMA_Slope_Color(20, true)[1]
&& EMA(5)[0] > EMA(5)[1]
&& EMA(5)[0] > EMA(5)[2]
&& Median[0] <= EMA(5)[0]
&& High[0] > EMA_Slope_Color(20, true)[0]
&& CrossAbove(EMA(5), EMA_Slope_Color(20, true), 5)
&& Force_Index_v02("EMA", 13, "EMA", 13).FastLineAbove[0] > 0)
{
AtmStrategyCreate(OrderAction.Buy, OrderType.Market, 0, 0,
TimeInForce.Day, GetAtmStrategyUniqueId(), "PERATM",
GetAtmStrategyUniqueId());
}
}
Note: PERATM is the name of the ATM template.

Comment