My strategy is set up to only submit orders of 2. Why did I get two orders of 1 and then my normal order?
Here is the simple code:
// Condition set 1
if (CrossAbove(EMA(57), SMA(226), 1))
{
EnterLong(2, "");
ExitShort("", "");
}
// Condition set 2
if (CrossBelow(EMA(67), SMA(222), 1))
{
ExitLong("", "");
EnterShort(2, "");
}
}
}
Clearly I have it set to buy and sell in orders of 2. Why did it sell two single orders of 1 contract, THEN close the position and then enter a short position of 2 like the strategy says. I am so confused here.
Comment