When a buy order is being placed via my NT strategy, the buy goes through to my broker (Ameritrade) just fine but in the NT log, I get the following error, which also puts a halt to my script:
Unable to Match order state to Execution: Order="blahblah" Name='Purchase' State='Filled Instrument', etc, etc.
I do have the following bit in my OnOrderUpdate function:
protected override void OnOrderUpdate(IOrder order)
{
if (entryOrder != null && entryOrder.Token == order.Token)
{
if (order.OrderState == OrderState.Filled)
{
etc...
So what's going on here? Unfortunately, since my strategy crashed, I wasn't able to sell when I wanted to sell.
Should I just use Error Handling here? What would be the best idea?
Comment