To answer your questions directly, OnExecutionUpdate is called once every order successfully executes. The entryOrder object is your way to tell execution.Orders apart. This handle to your order is set immediately when you place your order, and is nulled when your order has been filled.
If you are noticing a difference in behavior between execution.Order.Name == "Entry Order" and execution.Order == entryOrder, the most likely reason for this is that your entryOrder object is being overwritten. That is,
- You set entryOrder to order A with the name "Entry Order"
- You set entryOrder to order B with the name "Entry order"
- Order A executes
Comment