I implemented a strategy, but when I try to use SubmitOrder() nothing happens. Please see the code below. It prints "1" before, but doesn't print "2" after. No order, no exception, and nothing else appears in the log or Output window.
Please note, that I call MyFunc() from an external thread (if this matters).
In the Strategies window I set strategy Enabled.
Please advise.
public void MyFunc()
{
try
{
Print("1");
IOrder order = SubmitOrder(0, OrderAction.Buy, OrderType.Limit, 1, 1740.5, 0, "", "");
Print("2");
}
}
catch (Exception ex)
{
Print(ex.ToString());
}
}
Comment