I tried the following..."doesnt work)
I also tried using just
if (Position.MarketPosition == MarketPosition.Long)
Still doesnt work.,....on a 1min chart, the code keeps buying multiple contracts...and you can see it increase....2,3.....4...
I want to make sure it enters only one at a time...
if (Position.MarketPosition == MarketPosition.Long || Position.MarketPosition)
{
if (MACD(12, 26, 9)[0] > MACD(12, 26, 9)[1]
&& MACD(12, 26, 9).Avg[0] > MACD(12, 26, 9).Avg[1])
{
AtmStrategyCreate(OrderAction.Buy, OrderType.Market, 0, 0,
TimeInForce.Day, GetAtmStrategyUniqueId(), "myfill",
GetAtmStrategyUniqueId());
}
}
regards,
Comment