protected override void OnOrderUpdate(IOrder order) { if (myEntryOrder != null && myEntryOrder.OrderState == OrderState.Filled && Order.Name == "ShortEntry1"+shortcount) { orderFillPriceShort1 = Order.AvgFillPrice; } }
The error I get is:
An object reference is required for the non-static field, method, or property 'NinjaTrader.Cbi.Order.Name.get'
I assume this is because the shortcount piece of the entry name is a variable? Should this price-catching code be under OnBarUpdate instead? I'm not sure that's something I want to do though because I want to call the price-catching code when the entry order for the trade fills. What is a good solution for this?
Comment