I have the following very simple strategy of HMA crossing
// Set 1
if (CrossAbove(HMA1, HMA2, 1))
{
EnterLong(Convert.ToInt32(DefaultQuantity), "");
}
// Set 2
if (CrossBelow(HMA1, HMA2, 1))
{
EnterShort(Convert.ToInt32(DefaultQuantity), "");
}
When I execute it in historical mode it works without problems, but when I work in real time it always executes the double number of contracts. Any idea what the problem is?
Comment